title: Figuring out initWithFrame:self.view.frame 20 pixel (status bar) issue once and for all
body: <p>I have a simple UINavigationController. In the init method I am creating and adding a UITableView as a subview.</p>
  
  <pre><code>- (id)init {
      self = [super init];
      if (self) {
          NSLog(@"%@", NSStringFromCGRect(self.view.frame)); // {{0, 20}, {320, 460}}
          tableView = [[UITableView alloc] initWithFrame:self.view.frame];
          [self.view addSubview:tableView];
      }
      return self;
  }
  </code></pre>
  
  <p>I find I always run into the same annoying issue when working with new projects. Added subviews end up 20 pixels below the navigation bar.</p>
  
  <p>Why is it that I end up with {{0, 20}, {320, 460}} for self.view.frame? I don't want to force the CGRect frame, I'd rather set it based on the view controller's frame so I don't run into issues with dynamic frame changes (tethering, phone call, etc. where the status bar is taller).</p>
  
  <p><strong>Update:</strong> Also noticed I am getting a 460 height for the frame. That doesn't make sense either. In my case, I actually have a tab bar, so the height shouldn't that be minus the status bar, minus the uinavigationbar and minus the tab bar heights?</p>
  
  <p>Thanks</p>