I'm working on a chat application where I'm using Alex Barinovs
chat bubble table view example. I'm able to add messages and images on the bubbles. But What I want is when I tap on any row or cell, I want to get the details of that particular cell I tapped. I have a method called onListTap , which is a UItapGestureRecognizer
method, I'm able to get the index path of table view on tap. But the data it returns on that cell is somewhat like this-
tapped cell data - <NSBubbleData: 0x7fe6c3160f10>
Can anyone please tell me how to read this (NSBubbleData) data and how to identify which type of data it is (image, text, view ,etc).
Here is my onListTap method:
- (void)onListTap:(UIGestureRecognizer*)recognizer {
if (recognizer.state == UIGestureRecognizerStateEnded) {
CGPoint tapLocation = [recognizer locationInView:_bubbleTable];
NSIndexPath *tapIndexPath = [_bubbleTable indexPathForRowAtPoint:tapLocation];
NSLog(@" tapped cell data - %@",[newMessageArray objectAtIndex: tapIndexPath.row]);
}
}
where, newMessageArray is my bubble tableview array.