title: Add a UINavigationController nested inside a container view controller to a UITabBarController
body: <p>I have a <code>UIViewController</code> (red) set as the first tab of a <code>UITabBarController</code> as shown in the storyboard below. This view controller is a container view controller and loads a <code>UINavigationController</code> inside its <code>contentView</code> (the white rectangle inside the red view controller).</p>
  
  <p><img src="https://i.stack.imgur.com/eKC28.png" alt="Storyboard"></p>
  
  <p>This is my code for loading the navigation controller inside the red view controller's <code>contentView</code>:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
  
      // instantiate navigation controller
      UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
      UINavigationController *navigationVC = [storyboard instantiateViewControllerWithIdentifier:@"N"];
  
      // place navigation controller inside content view
      [self addChildViewController:navigationVC];
      navigationVC.view.frame = self.containerView.bounds;
      [self.containerView addSubview:navigationVC.view];
      [navigationVC didMoveToParentViewController:self];
  }
  </code></pre>
  
  <p>From what I know about view controller containment this <em>should</em> work as I am explicitly setting the frame for the navigation controller. However, when there are enough cells in the <code>tableView</code> to exceed the container's height there is always a bar at the end of the <code>tableView</code> when I scroll down. I have set the <code>tableView</code>'s <code>backgroundColor</code> to <em>orange</em> and the cell's <code>backgroundColor</code> to <em>white</em> in order to see the difference.</p>
  
  <p><img src="https://i.stack.imgur.com/vCu0j.png" alt="Gap at the end of the tableView"></p>
  
  <p>How do I get rid of that orange gap at the end of the <code>tableView</code>?</p>
  
  <p>(Note: I am <em>not</em> using autolayout and I need a solution that works for both - iOS7 <em>and</em> iOS6.)</p>