Added custom image masking

This commit is contained in:
GitNirajHub committed 2024-08-29 00:12:16 +05:30
1 parent 0c89acc6b5
commit 3dffe09b4f
7 files changed
+48 -10

No files matched your search

@@ -67,7 +67,11 @@ extension BasicExampleViewController: MessagesDisplayDelegate {
func messageStyle(for message: MessageType, at _: IndexPath, in _: MessagesCollectionView) -> MessageStyle {
let tail: MessageStyle.TailCorner = isFromCurrentSender(message: message) ? .bottomRight : .bottomLeft
return .bubbleTail(tail, .curved)
if let image = UIImage(named: "bobbly") {
return .customImageTail(image, tail)
} else {
return .bubbleTail(tail, .curved)
}
}
func configureAvatarView(_ avatarView: AvatarView, for message: MessageType, at _: IndexPath, in _: MessagesCollectionView) {