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