title: Segue Popover won't behave properly
body: <p>I'm trying to use Segue to present then dismiss a Popover view a <code>UIBarButtonItem</code> is clicked.</p>
  
  <p>I've created a generic Segue that is not anchored to anything but the view and given it a name</p>
  
  <p>I've Anchored the UIBarButtonItem in the Interface Builder to:</p>
  
  <pre><code>- (IBAction)clickedSettings:(id)sender {
  
      if(self.popSegue != nil) {
          [self.popSegue.popoverController dismissPopoverAnimated:YES];
      } else {
          //Current says only a button may
          [self performSegueWithIdentifier:@"Settings" sender:sender];
      }
  }
  </code></pre>
  
  <p>But when ever i click the button to display the Segue it gives me an error:</p>
  
  <p><strong>Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIStoryboardPopoverSegue must be presented from a bar button item or a view.'</strong></p>
  
  <p>It doesn't even hit my <code>-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender</code></p>
  
  <p>I've read the following questions on stack:</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/q/8656348/933887">iOS:How to dismiss Popover</a></li>
  <li><a href="https://stackoverflow.com/q/8598557/933887">UIBarButtonItem + popover segue creates multiple popovers</a></li>
  </ol>
  
  <p>But i still get the same error. For the life of me i can't figure out what is going wrong</p>