title: orientation changed is not working
body: <p>Thanks in advance </p>
  
  <p>I want to detect when orientation changed in my device ...
  for that I used this listener</p>
  
  <pre><code>[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
  [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) name:@"UIDeviceOrientationDidChangeNotification" object:nil];
  </code></pre>
  
  <p>and orientation changed method is </p>
  
  <pre><code>- (void) orientationChanged:(id)obj
  {  
      if( [UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeLeft || [UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeRight )
      {
          self.view=self.landscapeView;
          NSLog(@"landscapeView");
  
         //[self loadView1];
      }
      else 
      {
         self.view = self.portraitView;
         NSLog(@"portraitView");
  
         //[self loadView1];
      }    
  }
  </code></pre>
  
  <p>and every time its went into that orientation which was on ViewDidLoad() methode ...</p>
  
  <p>can any one help me..</p>