title: ios 7 presenting first nav controller with a back button
body: <p>I am presenting a new view table view controller as the root controller for a navigation controller. I then add a back button with a selector, but when I click the button nothing is called. I am only presenting it in a nav controller because i want to have the back button on the table view. Here is my code to show the controller:</p>
  
  <pre><code>UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil];
  
      ATDetailTableViewController *detailViewController = [sb instantiateViewControllerWithIdentifier:@"ATDetailTableViewController"];
      detailViewController.propToDisplay = self.apartments[0];
      detailViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
      UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:detailViewController];
      [self presentViewController:nav animated:YES completion:nil];
  </code></pre>
  
  <p>Then when the detailviewcontroller loads, i create the bar button item that does not call the selector method:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Back"
                                                                     style:UIBarButtonItemStyleBordered
                                                                    target:nil
                                                                    action:@selector(backPressed)];
      self.navigationItem.leftBarButtonItem = backButton;
  }
  
  - (void)backPressed
  {
      NSLog(@"back pressed...");
      [self.presentingViewController.presentingViewController dismissViewControllerAnimated:YES completion:nil];
  }
  </code></pre>
  
  <p>What is the best practice here? Should I just make a view controller with a toolbar? Also, I am getting the warning:  Presenting view controllers on detached view controllers is discouraged </p>