Search code examples
objective-cjsqmessagesviewcontroller

JSQMessagesViewController timestamp inside bubble


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


Solution

  • 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
    }