Try this instead:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath: (NSIndexPath *)indexPath
{
// Standard bubble
NSBubbleData *data = [[self.bubbleSection objectAtIndex:indexPath.section] objectAtIndex:indexPath.row];
static NSString *cellId1 = @"tblBubbleCell";
UIBubbleTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId1];
if (cell == nil) {
cell = [[UIBubbleTableViewCell alloc] init];
UILongPressGestureRecognizer *recognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPress:)];
[cell addGestureRecognizer:recognizer];
}
cell.data = data;
cell.key=data.key;
cell.showAvatar = self.showAvatars;
return cell;
}
I don't know if this is causing your problem, but you only need to add the gesture recognizer to each cell once. Also, you should probably use initWithStyle:
in your cell subclass.