MessageInputBarDelegate
public protocol MessageInputBarDelegate: AnyObject
A protocol that can receive different event notifications from the MessageInputBar.
-
messageInputBar(_:didPressSendButtonWith:)
Default implementationCalled when the default send button has been selected.
Default Implementation
Declaration
Swift
func messageInputBar(_ inputBar: MessageInputBar, didPressSendButtonWith text: String)
Parameters
inputBar
The
MessageInputBar
.text
The current text in the
InputTextView
of theMessageInputBar
. -
messageInputBar(_:didChangeIntrinsicContentTo:)
Default implementationCalled 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
The
MessageInputBar
.size
The new instrinsic content size.
-
messageInputBar(_:textViewTextDidChangeTo:)
Default implementationCalled when the
MessageInputBar
‘sInputTextView
’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