title: How To Correctly Segue To An Embedded Tab Bar and Navigation Controller Using Storyboards?
body: <p>I've got an app where the user selects their country from a picker wheel.  An alert comes up and asks them to confirm the change.  If they confirm, it takes them to a different view where they can then select from a list of categories to display information...</p>
  
  <p>The list of categories is embedded in a Navigation Controller to facilitate moving from the detailed view "Back" to the category select view.</p>
  
  <p>The entire app is embedded in a Tab Bar Controller.</p>
  
  <p>It works fine (after selecting their country they are taken to the Select Category screen) except that now the Select Categories has lost its connection to the Tab Bar Controller and there is no way to get back to other parts of the app. </p>
  
  <p>Here's my alertView code:</p>
  
  <pre><code>- (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
  
  if (buttonIndex == 0) {
  NSLog(@"ok");
  
  //I tried the following but it doesn't do anything
  //SelectCategory *switchtocategory = [[SelectCategory alloc] init];
  //[self.navigationController pushViewController:switchtocategory animated:YES];
  
  //the following works but loses the tab/navigation bars
  [self performSegueWithIdentifier: @"GoToCategory" sender: self];
  
      } else {
  
      NSLog(@"cancel");
  
  }
  </code></pre>
  
  <p>}</p>