title: iOS segue executed twice
body: <p>I have a table view with different types of table view cells in it. In one of the cells, there are two buttons, which load a view controller when pressed. I am using the following function to handle the button press:</p>
  
  <pre><code>- (IBAction)leftButtonPressed:(id)sender
  {
      // Getting the pressed button
      UIButton *button = (UIButton*)sender;
      // Getting the indexpath
      NSIndexPath *indPath = [NSIndexPath indexPathForRow:button.tag inSection:0];
      // Loading the proper data from my datasource
      NSArray *clickedEvent = [[[SOEventManager sharedEventManager] eventsArray] objectAtIndex:indPath.row];
      [[SOEventManager sharedEventManager] setSelectedEvent:clickedEvent[0]];
      // Everything working as it should up to this point
      // Performing seque...
      [self performSegueWithIdentifier:@"buttonSegue" sender:self];
  }
  </code></pre>
  
  <p>My buttonSegue is supposed to push a new view controller. Somehow instead of pushing once, it appears to be pushing twice, so I get the following warning:</p>
  
  <pre><code>2013-11-27 01:48:30.894 Self-Ordering App[2081:70b] nested push animation can result in corrupted navigation bar 
  2013-11-27 01:48:31.570 Self-Ordering App[2081:70b] Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.
  </code></pre>
  
  <p>In my case it leads to a crash, since there is an event in which I want the app to immediately pop the view controller so it an go back to my table view. I use an alertview for this and handle the event with the following:</p>
  
  <pre><code>- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
  {
      NSString *buttonTitle = [alertView buttonTitleAtIndex:buttonIndex];
      // ...
      // Additional checking of button titles....
      else if ([buttonTitle isEqualToString:NSLocalizedString(@"Vissza", nil)])
      {
          [self.navigationController popViewControllerAnimated:YES];
      }
  }
  </code></pre>
  
  <p>It might me interesting to note that I have an other segue from my "regular" table view cell, and in that case I use the prepareForSegue: method</p>
  
  <pre><code>- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
  {
      if ([segue.identifier isEqualToString:@"detailSegue"])
      {
          NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
          SOEvent *selectedEvent = [[[SOEventManager sharedEventManager] eventsArray] objectAtIndex:indexPath.row];
          [[SOEventManager sharedEventManager] setSelectedEvent:selectedEvent];
      }
  }
  </code></pre>
  
  <p>In this case the view controller gets pushed perfectly, and even popped immediately if that is required. I am testing this on iOS7 and Xcode 5. I haven't encountered a problem like this before, any help would be greatly appreciated.</p>