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
MessageType
for the cell by usingUICollectionView
‘sindexPath(for: cell)
method. Then using the returnedIndexPath
with theMessagesDataSource
methodmessageForItem(at:indexPath:messagesCollectionView)
.Default Implementation
Declaration
Swift
func didTapMessage(in cell: MessageCollectionViewCell)
Parameters
cell
The cell where the tap occurred.
-
didTapAvatar(in:)
Default implementationTriggered when a tap occurs in the
AvatarView
.You can get a reference to the
MessageType
for the cell by usingUICollectionView
‘sindexPath(for: cell)
method. Then using the returnedIndexPath
with theMessagesDataSource
methodmessageForItem(at:indexPath:messagesCollectionView)
.Default Implementation
Declaration
Swift
func didTapAvatar(in cell: MessageCollectionViewCell)
Parameters
cell
The cell where the tap occurred.
-
didTapCellTopLabel(in:)
Default implementationTriggered when a tap occurs in the cellTopLabel.
You can get a reference to the
MessageType
for the cell by usingUICollectionView
‘sindexPath(for: cell)
method. Then using the returnedIndexPath
with theMessagesDataSource
methodmessageForItem(at:indexPath:messagesCollectionView)
.Default Implementation
Declaration
Swift
func didTapCellTopLabel(in cell: MessageCollectionViewCell)
Parameters
cell
The cell tap the touch occurred.
-
didTapMessageTopLabel(in:)
Default implementationTriggered when a tap occurs in the messageTopLabel.
You can get a reference to the
MessageType
for the cell by usingUICollectionView
‘sindexPath(for: cell)
method. Then using the returnedIndexPath
with theMessagesDataSource
methodmessageForItem(at:indexPath:messagesCollectionView)
.Default Implementation
Declaration
Swift
func didTapMessageTopLabel(in cell: MessageCollectionViewCell)
Parameters
cell
The cell tap the touch occurred.
-
didTapMessageBottomLabel(in:)
Default implementationTriggered when a tap occurs in the messageBottomLabel.
You can get a reference to the
MessageType
for the cell by usingUICollectionView
‘sindexPath(for: cell)
method. Then using the returnedIndexPath
with theMessagesDataSource
methodmessageForItem(at:indexPath:messagesCollectionView)
.Default Implementation
Declaration
Swift
func didTapMessageBottomLabel(in cell: MessageCollectionViewCell)
Parameters
cell
The cell where the tap occurred.