[英]How to put messageBottomLabel inside of message bubble?
I am using messageKit.我正在使用 messageKit。 I want to add time when the message was sent inside of messageBottomLabel.我想添加消息在 messageBottomLabel 中发送的时间。 However visually it is outside of message bubble.但是在视觉上它在消息气泡之外。
But I want it to be inside of the bubble, like this:但我希望它位于气泡内,如下所示:
"func customCell(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UICollectionViewCell func customCell(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> UICollectionViewCell
func configure(with message: MessageType, at indexPath: IndexPath, and messagesCollectionView: MessagesCollectionView) func 配置(带有消息:MessageType,在 indexPath:IndexPath 和 messagesCollectionView:MessagesCollectionView)
set label text like this:像这样设置标签文本:
if let dataSource = messagesCollectionView.messagesDataSource { captionLabel.text = dataSource.messageBottomLabelAttributedText(for: message, at: indexPath) } else { fatalError("Datasource is null!") }
override func messageContainerSize(for message: MessageType) -> CGSize覆盖 func messageContainerSize(for message: MessageType) -> CGSize
看看这篇文章: 创建聊天气泡<\/a>
"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.