title: Prevent multiple Tap on the same UIButton
body: <p>Some times in my app I get this error because the UI freezes and the users tap more than once the buttons:</p>
  
  <blockquote>
    <p>"pushing the same view controller instance more than once is not
    supported"</p>
  </blockquote>
  
  <p>I have tried this:</p>
  
  <p><a href="https://stackoverflow.com/questions/28343070/how-do-i-prevent-multiple-event-on-same-uibutton-in-ios">How to prevent multiple event on same UIButton in iOS?</a></p>
  
  <p>And it works like a charm but if my tabbar has more than 5 elements if I tab the button that shows an element greater than 5 the more button animates from left to right.</p>
  
  <p>Is there other way to prevent the double tab in an easy way that does not use animations?.</p>
  
  <p>This is the code I'm using:</p>
  
  <pre><code>- (IBAction)btnAction:(id)sender {
      UIButton *bCustom = (UIButton *)sender;
      bCustom.userInteractionEnabled = NO;
      [UIView animateWithDuration:1.0 delay:0.0 options:UIViewAnimationOptionAllowAnimatedContent animations:^{
          [self selectTabControllerIndex:bCustom.tag];
      } completion:^(BOOL finished){
          bCustom.userInteractionEnabled = YES;
      }];
  }
  </code></pre>