title: Best Practices, addChildViewController, addSubview
body: <p>I am creating an app using iOS 5, and I want to work as follows:</p>
  
  <p>MainViewController w/ NavigationBar, and i set on viewDidLoad: </p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
  
      NavViewController *nav = [[NavViewController alloc] init];
      [self addChildViewController:nav];
      [self.view addSubview:nav.view];
  }
  </code></pre>
  
  <p>Like a "partial view" with some nav controls (my own/custom toolbar), and at NavViewController:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      CGRect viewRect = CGRectMake(0, 0, 320, 200);
      self.view.frame = viewRect;
      self.view.backgroundColor = [UIColor redColor];
  }
  </code></pre>
  
  <p>At this point I have MainViewController with a navigation subview and still have space (in MainViewController view) that another subview can be added using the actions NavViewController.</p>
  
  <p>Is there a serious flaw in this logic? or I can keep developing ?</p>
  
  <p>Thnks a lot.</p>