1
タイムスタンプロジックを変更して、以下のスクリーンショットに示すように時間を繰り返さないようにするにはどうすればよいですか?ここですぐにJSQmessageVCタイムスタンプロジックを変更する
私のコードは..です
オーバーライドFUNCのcollectionView(collectionView:JSQMessagesCollectionView!attributedTextForCellTopLabelAtIndexPath indexPath:NSIndexPath!) - > NSAttributedString! {
if indexPath.item % 3 == 0 {
let message = messages[indexPath.item]
return JSQMessagesTimestampFormatter.sharedFormatter().attributedTimestampForDate(message.date)
}
return nil
}
override func collectionView(collectionView: JSQMessagesCollectionView!, layout collectionViewLayout: JSQMessagesCollectionViewFlowLayout!, heightForCellTopLabelAtIndexPath indexPath: NSIndexPath!) -> CGFloat {
if indexPath.item % 3 == 0 {
return kJSQMessagesCollectionViewCellLabelHeightDefault
}
return 0.0
}