Setting screen orientations in iOS

by


Recently I started a project which required an iOS app to be locked in landscape orientation. The method mentioned below was always the standard for locking/setting the orientation, but iOS 6 deprecated this method. This post will show and explain some other options that I came across when investigating alternative options for locking the screen.

 
[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight];