MessageContentCell

open class MessageContentCell: MessageCollectionViewCell

A subclass of MessageCollectionViewCell used to display text, media, and location messages.

  • 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 frame

    Declaration

    Swift

    open override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool
  • Handle ContentView‘s tap gesture, return false when ContentView doesn’t needs to handle gesture

    Declaration

    Swift

    open func cellContentView(canHandle touchPoint: CGPoint) -> Bool