Prevent UITableView from receiving two touches (nested pop animation can result in corrupted navigation bar)

Just set userInteractionEnabled to NO like this

in your viewWillAppear

-(void)viewWillAppear:(BOOL)animated
{

  // if you return from another viewController
  [tableView setUserinteractionEnabled:YES];

}

-(void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{

  // do your logic here and at the end just set user interaction to NO
  [tableView setUserInteractionEnabled:NO];

}

This will block all user interactions with your tableview.


Here is one line solution

self.tableView.multipleTouchEnabled = NO;

A fix I've found for the issue described here is wrapping all my didSelectRowAtIndexPath code inside the following check:

    if ([[self navigationController] topViewController] == self) {
        [your existing didSelectRowAtIndexPath code here]
    }

This checks to see whether another view controller has already been pushed to the top of the view controller stack (and is still waiting to actually appear on screen for some reason).

I believe that the multiTouchEnabled property mentioned elsewhere actually refers to the multi-touch feature, which allows iOS to register several touch events simultaneously (for example, pinch-to-zoom using two fingers on the screen at the same time) rather than multiple sequential touches.