MessageInputBarDelegate

public protocol MessageInputBarDelegate: AnyObject

A protocol that can receive different event notifications from the MessageInputBar.

  • Called when the default send button has been selected.

    Default Implementation

    Declaration

    Swift

    func messageInputBar(_ inputBar: MessageInputBar, didPressSendButtonWith text: String)

    Parameters

    inputBar
    text

    The current text in the InputTextView of the MessageInputBar.

  • Called when the instrinsicContentSize of the MessageInputBar has changed. Can be used for adjusting content insets on other views to make sure the MessageInputBar does not cover up any other view.

    Default Implementation

    Declaration

    Swift

    func messageInputBar(_ inputBar: MessageInputBar, didChangeIntrinsicContentTo size: CGSize)

    Parameters

    inputBar
    size

    The new instrinsic content size.

  • Called when the MessageInputBar‘s InputTextView’s text has changed. Useful for adding your own logic without the need of assigning a delegate or notification.

    Default Implementation

    Declaration

    Swift

    func messageInputBar(_ inputBar: MessageInputBar, textViewTextDidChangeTo text: String)

    Parameters

    inputBar

    The MessageInputBar

    text

    The current text in the MessageInputBar’s InputTextView