Sauron Sauron - 2 years ago 325
Swift Question

JSQMessagesViewController Click on message action

I have implemented JSQMessagesViewController into my app, and it has been excellent thus far.

However, I wish to allow a user to click on certain image messages in the list that would then take them to to another view controller.

Is this possible with JSQMessagesViewController?

Answer Source

Yes, you can do that, there is a delegate methods of JSQMessagesCollectionView

func collectionView(collectionView: JSQMessagesCollectionView, didTapMessageBubbleAtIndexPath indexPath: NSIndexPath) {

from there you can get the data of selected bubble and as per the data you can redirect the user to the next controller.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download