MessageCellDelegate
public protocol MessageCellDelegate: MessageLabelDelegate
A protocol used by MessageContentCell subclasses to detect taps in the cell’s subviews.
-
didTapMessage(in:)Default implementationTriggered when a tap occurs in the
MessageContainerView.Note
You can get a reference to the
MessageTypefor the cell by usingUICollectionView‘sindexPath(for: cell)method. Then using the returnedIndexPathwith theMessagesDataSourcemethodmessageForItem(at:indexPath:messagesCollectionView).Default Implementation
Declaration
Swift
func didTapMessage(in cell: MessageCollectionViewCell)Parameters
cellThe cell where the tap occurred.
-
didTapAvatar(in:)Default implementationTriggered when a tap occurs in the
AvatarView.You can get a reference to the
MessageTypefor the cell by usingUICollectionView‘sindexPath(for: cell)method. Then using the returnedIndexPathwith theMessagesDataSourcemethodmessageForItem(at:indexPath:messagesCollectionView).Default Implementation
Declaration
Swift
func didTapAvatar(in cell: MessageCollectionViewCell)Parameters
cellThe cell where the tap occurred.
-
didTapCellTopLabel(in:)Default implementationTriggered when a tap occurs in the cellTopLabel.
You can get a reference to the
MessageTypefor the cell by usingUICollectionView‘sindexPath(for: cell)method. Then using the returnedIndexPathwith theMessagesDataSourcemethodmessageForItem(at:indexPath:messagesCollectionView).Default Implementation
Declaration
Swift
func didTapCellTopLabel(in cell: MessageCollectionViewCell)Parameters
cellThe cell tap the touch occurred.
-
didTapMessageTopLabel(in:)Default implementationTriggered when a tap occurs in the messageTopLabel.
You can get a reference to the
MessageTypefor the cell by usingUICollectionView‘sindexPath(for: cell)method. Then using the returnedIndexPathwith theMessagesDataSourcemethodmessageForItem(at:indexPath:messagesCollectionView).Default Implementation
Declaration
Swift
func didTapMessageTopLabel(in cell: MessageCollectionViewCell)Parameters
cellThe cell tap the touch occurred.
-
didTapMessageBottomLabel(in:)Default implementationTriggered when a tap occurs in the messageBottomLabel.
You can get a reference to the
MessageTypefor the cell by usingUICollectionView‘sindexPath(for: cell)method. Then using the returnedIndexPathwith theMessagesDataSourcemethodmessageForItem(at:indexPath:messagesCollectionView).Default Implementation
Declaration
Swift
func didTapMessageBottomLabel(in cell: MessageCollectionViewCell)Parameters
cellThe cell where the tap occurred.
MessageCellDelegate Protocol Reference