MessageContentCell
open class MessageContentCell: MessageCollectionViewCell
A subclass of MessageCollectionViewCell used to display text, media, and location messages.
-
The image view displaying the avatar.
Declaration
Swift
open var avatarView = AvatarView() -
The container used for styling and holding the message’s content view.
Declaration
Swift
open var messageContainerView: MessageContainerView = -
The top label of the cell.
Declaration
Swift
open var cellTopLabel: InsetLabel = -
The top label of the messageBubble.
Declaration
Swift
open var messageTopLabel: InsetLabel = -
The bottom label of the messageBubble.
Declaration
Swift
open var messageBottomLabel: InsetLabel = -
The
MessageCellDelegatefor the cell.Declaration
Swift
open weak var delegate: MessageCellDelegate? -
Undocumented
Declaration
Swift
public override init(frame: CGRect) -
Undocumented
Declaration
Swift
required public init?(coder aDecoder: NSCoder) -
Undocumented
Declaration
Swift
open func setupSubviews() -
Undocumented
Declaration
Swift
open override func prepareForReuse()
-
Undocumented
Declaration
Swift
open override func apply(_ layoutAttributes: UICollectionViewLayoutAttributes) -
Used to configure the cell.
Declaration
Swift
open func configure(with message: MessageType, at indexPath: IndexPath, and messagesCollectionView: MessagesCollectionView)Parameters
messageThe
MessageTypethis cell displays.indexPathThe
IndexPathfor this cell.messagesCollectionViewThe
MessagesCollectionViewin which this cell is contained. -
Handle tap gesture on contentView and its subviews.
Declaration
Swift
open func handleTapGesture(_ gesture: UIGestureRecognizer) -
Handle long press gesture, return true when gestureRecognizer’s touch point in
messageContainerView‘s frameDeclaration
Swift
open override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool -
Handle
ContentView‘s tap gesture, return false whenContentViewdoesn’t needs to handle gestureDeclaration
Swift
open func cellContentView(canHandle touchPoint: CGPoint) -> Bool
-
Positions the cell’s
AvatarView.- attributes: The
MessagesCollectionViewLayoutAttributesfor the cell.
Declaration
Swift
open func layoutAvatarView(with attributes: MessagesCollectionViewLayoutAttributes) - attributes: The
-
Positions the cell’s
MessageContainerView.- attributes: The
MessagesCollectionViewLayoutAttributesfor the cell.
Declaration
Swift
open func layoutMessageContainerView(with attributes: MessagesCollectionViewLayoutAttributes) - attributes: The
-
Positions the cell’s top label.
- attributes: The
MessagesCollectionViewLayoutAttributesfor the cell.
Declaration
Swift
open func layoutCellTopLabel(with attributes: MessagesCollectionViewLayoutAttributes) - attributes: The
-
Positions the message bubble’s top label.
- attributes: The
MessagesCollectionViewLayoutAttributesfor the cell.
Declaration
Swift
open func layoutMessageTopLabel(with attributes: MessagesCollectionViewLayoutAttributes) - attributes: The
-
Positions the cell’s bottom label.
- attributes: The
MessagesCollectionViewLayoutAttributesfor the cell.
Declaration
Swift
open func layoutBottomLabel(with attributes: MessagesCollectionViewLayoutAttributes) - attributes: The
MessageContentCell Class Reference