title: Device Orientation not getting.
body: <p>Currently i am working on IOS 7 and my problem is i am not able to get orientation of current device in ViewDidLoad method.</p>
  
  <pre><code>- (BOOL)shouldAutorotate
  {
      return YES;
  }
  
  - (NSUInteger)supportedInterfaceOrientations
  {
      return (UIInterfaceOrientationMaskAll);
  
  }
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
      if (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)){
          NSLog(@"i am in landscape mode");
      }
      if (UIDeviceOrientationIsPortrait([UIDevice currentDevice].orientation)){
          NSLog(@"i am in portrait mode");
      }
  }
  </code></pre>
  
  <p>I write this code in my <code>FirstViewController.m</code>,and when i run my application no condition become true out of them,
  can anybody help me why no condition become true even i run my application in portrait mode.
  Thanks in advance.</p>