3
我正在尝试向JSQMessageViewController添加日期标签,并且实现正确的方法,但没有任何显示。这里是我的代码:如何在Swift中的JSQMessagesViewController中添加日期标签
override func collectionView(collectionView: JSQMessagesCollectionView!, attributedTextForCellBottomLabelAtIndexPath indexPath: NSIndexPath!) -> NSAttributedString! {
let message: JSQMessage = self.messages[indexPath.item]
return JSQMessagesTimestampFormatter.sharedFormatter().attributedTimestampForDate(message.date)
}
谢谢!