title: iOS 6 - programmatically triggering Unwind Segue does nothing
body: <p>On my app's start up, it programmatically shows a LoginViewController using a segue. The view controller is presented modally with transition set to cross dissolve. Upon successful authentication, I want to dismiss the login view by programmatically triggering an unwind segue. So I added this to my header file:</p>
  
  <pre><code>- (IBAction)unwindSegue:(UIStoryboardSegue *)segue;
  </code></pre>
  
  <p>now in IB I'm able to control-drag from the "File's Owner" LoginViewController to the Exit button and choose <code>unwindSegue:</code>. This creates a manual segue, it shows up in the Connections inspectors for the File's Owner and the Exit button correctly. I then click on the newly created Unwind segue from the scene in IB and then give it a name. If I click on the "go to" button for the unwind segue action it takes me to the declaration mentioned above.</p>
  
  <p>So far so good, I then trigger this unwind segue upon successful authentication in my GCD block:</p>
  
  <pre><code>....
  dispatch_async(dispatch_get_main_queue(), ^
  {
      [self performSegueWithIdentifier:@"UnwindSegueIdentifier" sender:self];
  
      [self.spinner removeFromSuperview];
      self.spinner = nil;
  });
  </code></pre>
  
  <p>.....and nothing happens when it runs. The spinner does get removed correctly, but there's no sign of that unwind segue executing.</p>
  
  <p>A break point in the implementation of <code>unwindSegue:</code> never gets hit. There are no errors thrown. Nothing gets written to the console. The identifier is correct, I triple checked (otherwise it will fail anyway).</p>
  
  <p>I looked at the answers <a href="https://stackoverflow.com/questions/12792573/cannot-connect-storyboard-unwind-segue">here</a>, <a href="https://stackoverflow.com/questions/12561735/what-are-unwind-segues-for-and-how-to-use-them">here</a> and <a href="https://stackoverflow.com/questions/12509422/how-to-perform-unwind-segue-programmatically">here</a> but I don't seem to have missed anything.</p>
  
  <p>What I did notice though, is that Xcode thinks <code>unwindSegue:</code> is <strong>not</strong> linked:
  <img src="https://i.stack.imgur.com/zle9m.png" alt="linked? not linked?"></p>
  
  <p>I'm unable to drag from the little empty circle in front of <code>unwindSegue:</code> and link it to the Exit button.</p>
  
  <p>Any help will be appreciated.</p>