Last Updated: February 25, 2016
· fousa

Fix your iOS 6 application to landscape and make it iO5 compatible

When you fix your orientation to landscape in your project than the app will turn to landscape when in iOS 6.


But for some weird reason this doesn't seem to work on iOS 5. The application always fixes to portrait. So I added the following code to every controller:

- (BOOL)shouldAutorotateToInterfaceOrientation(UIInterfaceOrientation)toInterfaceOrientation
    // Support for iOS 5
    return UIInterfaceOrientationIsLandscape(toInterfaceOrientation);

I don't have a lot of view controllers, so I didn't make it more dynamic. But it worked for me…