title: navigation bar is hidden when i return back to view in iOS
body: <p>I am new in iPhone development. I created an app which use a <strong>navigation bar</strong> using <strong>storyboard</strong>. My problem is that i am opening a <strong>viewB</strong> programmatically from viewA on button click and it successful. Now to go back to <strong>viewA</strong> i have used cancel button. when i click on cancel button (previous) the (<strong>viewA</strong>) is opened but navigation bar is not shown. and viewA have navigation bar control but <strong>viewB</strong> does not.   </p>
  
  <p>Thanks in advance</p>
  
  <p>View A</p>
  
  <pre><code> UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
      EditViewController *viewController = (EditViewController *)[storyboard instantiateViewControllerWithIdentifier:@"EditViewController"];
  
      [self presentViewController:viewController animated:NO completion:NULL];
  </code></pre>
  
  <p>View B:</p>
  
  <pre><code>- (IBAction)cancelButtonPressed:(id)sender {
      if ( lables != NULL) {
  
          UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
          ScannerViewController *viewController = (ScannerViewController *)[storyboard instantiateViewControllerWithIdentifier:@"ScannerViewController"];
  
          [self presentViewController:viewController animated:NO completion:NULL];
  
      }
      else{
  
          [self.navigationController popViewControllerAnimated:YES];
      }
  </code></pre>