title: how can load uinavigationcontroller to uiviewcontroller in ios application
body: <p>I am new in IOS development .Now i implement a UINavigationController to a UIViewController, but this give a gap from the top of the view .What is the reason for this?   and How can avoid this gap?</p>
  
  <p>This is My code</p>
  
  <pre><code>    - (void)viewDidLoad
  {
      [self.view setBackgroundColor:[UIColor greenColor]];
      SubClass *subClass=[[SubClass alloc]initWithNibName:@"SubClass" bundle:nil];
      UINavigationController *navi=[[UINavigationController alloc]initWithRootViewController:subClass];
      [self.view addSubview:navi.view];
      [super viewDidLoad];
  }
  </code></pre>
  
  <p>The Following is the Output.  </p>
  
  <p><img src="https://i.stack.imgur.com/0JvvA.png" alt="enter image description here"></p>
  
  <p>If anybody  know please help me.  Thanks in advance.</p>