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
MessageCellDelegate
for 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
message
The
MessageType
this cell displays.indexPath
The
IndexPath
for this cell.messagesCollectionView
The
MessagesCollectionView
in 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 whenContentView
doesn’t needs to handle gestureDeclaration
Swift
open func cellContentView(canHandle touchPoint: CGPoint) -> Bool
-
Positions the cell’s
AvatarView
.- attributes: The
MessagesCollectionViewLayoutAttributes
for the cell.
Declaration
Swift
open func layoutAvatarView(with attributes: MessagesCollectionViewLayoutAttributes)
- attributes: The
-
Positions the cell’s
MessageContainerView
.- attributes: The
MessagesCollectionViewLayoutAttributes
for the cell.
Declaration
Swift
open func layoutMessageContainerView(with attributes: MessagesCollectionViewLayoutAttributes)
- attributes: The
-
Positions the cell’s top label.
- attributes: The
MessagesCollectionViewLayoutAttributes
for the cell.
Declaration
Swift
open func layoutCellTopLabel(with attributes: MessagesCollectionViewLayoutAttributes)
- attributes: The
-
Positions the message bubble’s top label.
- attributes: The
MessagesCollectionViewLayoutAttributes
for the cell.
Declaration
Swift
open func layoutMessageTopLabel(with attributes: MessagesCollectionViewLayoutAttributes)
- attributes: The
-
Positions the cell’s bottom label.
- attributes: The
MessagesCollectionViewLayoutAttributes
for the cell.
Declaration
Swift
open func layoutBottomLabel(with attributes: MessagesCollectionViewLayoutAttributes)
- attributes: The