1

I'm using JSQMessagesViewController in my chat app.

I would like to add a small timestamp text inside the bubble on its lower right corner.

I have searched a lot but could not find any way to accomplish this using the API provided.

Any idea how I can do this ?

Thanks, Daniel

danflu
  • 325
  • 8
  • 25

1 Answers1

1

Just create a custom cell or xib and then when implementing the JSQ framework just use your custom cell in the

override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
     let cell = collectionView?.dequeueReusableCellWithReuseIdentifier("[YOURCUSTOMCELLIDENTIFYER]", forIndexPath: indexPath)

    //Configure your cell here

    return cell
}
Dan Leonard
  • 3,325
  • 1
  • 20
  • 32
  • how do you change the size of the bubble/cell to add the timestamp in the first place? – Happiehappie Apr 15 '16 at 12:35
  • @Happiehappie that is done by creating your own .XIB file for the cell. You place the labels where you want inside of it and use that for your messages. Then configure that cell in the method above. – Dan Leonard Apr 20 '16 at 21:47