title: Issue on navigation controller while changing the orientation
body: <p>I have two view controllers, in which I am using navigation controller to navigate from one view to another.....
  In my first view controller I'm checking the orientation in this way in my <code>- (void)viewDidLoad</code></p>
  
  <pre><code>if (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation))
  {
  //Do this task
  }
  else
  {
  //Do this task
  }
  </code></pre>
  
  <p>When I was trying to navigate from second to first viewcontroller..
  I am using this code to navigate</p>
  
  <pre><code>-(IBAction)back
  {
      [self.navigationController popViewControllerAnimated:YES];
  
  }
  </code></pre>
  
  <p>Here the problem arises...
   The above orientation condition is not checked.. When I was trying to navigate from second to first view controller......
  I don't know where I was lagging.... Whether I was stuck up with any logics or I want to change my code???????</p>