MessageKind

public enum MessageKind

An enum representing the kind of message and its underlying kind.

  • A standard text message.

    Note

    The font used for this message will be the value of the messageLabelFont property in the MessagesCollectionViewFlowLayout object.

    Using MessageKind.attributedText(NSAttributedString) doesn’t require you to set this property and results in higher performance.

    Declaration

    Swift

    case text(String)
  • A message with attributed text.

    Declaration

    Swift

    case attributedText(NSAttributedString)
  • An emoji message.

    Declaration

    Swift

    case emoji(String)
  • A custom message.

    Note

    Using this case requires that you override the following methods and handle this case:
    • collectionView(_:cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
    • cellSizeCalculatorForItem(at indexPath: IndexPath) -> CellSizeCalculator

    Declaration

    Swift

    case custom(Any?)