title: Could not restrict app to Landscape mode in just iOS 5 for iPad
body: <p>I am working on iPad app, which I restricted just onto Landscape (Right and Left) in info.plist file and also Project settings. This works fine for iOS 6 and 7 but this not working fine in iOS 5 when device move to portrait (app move to portrait also). I googled and then added code.
  in App delegate:</p>
  
  <pre><code>- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window  // iOS 6 autorotation fix
  {
  return UIInterfaceOrientationMaskLandscape;
  }
  </code></pre>
  
  <p>in each View controller.</p>
  
  <pre><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
  return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||interfaceOrientation == UIInterfaceOrientationLandscapeRight);
  }
  
  - (NSUInteger)supportedInterfaceOrientations{
  return UIInterfaceOrientationMaskLandscape;
  }
  </code></pre>
  
  <p>But alas, still same issue facing. I googled too much but couldn't any help. Kindly guide me on this. How to accomplish this task. Thanks.</p>