title: UIButton event which pushes view controller called multiple times when clicked rapidly
body: <p>I have a <code>UIButton</code> displayed in my <code>UIViewController</code>. This button is tied to the following IBAction through the xib (touchUpInside)</p>
  
  <pre><code>- (IBAction)messagesButtonPressed:(id)sender {
      ChatsViewController* chatsVC = [[ChatsViewController alloc] initWithNibName:@"ChatsViewController" bundle:nil];
      [self.navigationController pushViewController:chatsVC animated:YES];
  }
  </code></pre>
  
  <p>I've noticed that during a login operation which temporarily hangs the UI, if the user repeatedly clicks on this button, when the login operation completes this event is triggered TWICE. This causes the following:</p>
  
  <pre><code>nested push animation can result in corrupted navigation bar
  Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.
  </code></pre>
  
  <p>Additionally when I go back from this view I end up on the same page with a visible status/nav bar and a black content area. At this point clicking the back button again causes a crash.</p>
  
  <p>From what I understood iOS queues up interaction during periods of unresponsiveness, which might be the cause of this behaviour. A workaround I've added was just to disable userinteraction in the IBAction and re-enable in <code>viewWillAppear</code>. e.g.</p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated {
      [super viewWillAppear:animated];
      // ...
      [self.messagesButton setUserInteractionEnabled:YES];
  }
  
  - (IBAction)messagesButtonPressed:(id)sender {
      [self.messagesButton setUserInteractionEnabled:NO];
      ChatsViewController* chatsVC = [[ChatsViewController alloc] initWithNibName:@"ChatsViewController" bundle:nil];
      [self.navigationController pushViewController:chatsVC animated:YES];
  }
  </code></pre>
  
  <p>Is there a safer way to prevent this multi-touch?</p>
  
  <p>Edit: I should mention I've tried enabling exclusiveTouch and also cannot reproduce this after login has completed and the UI is back to normal no matter how quickly I press this button.</p>