You can change its orientation to Landscape by setting the show Attrubite Inspector property of the View in the VC corresponding XIB, which will be the horizontal screen layout by default.
We can set the orientation of the app interface in 3 different ways.
First: Through Global settings
The system only calls this method if the application delegate have not
Implemented the delegate equivalent. It returns the orientations specified by
The application ' s info.plist. IF no supported interface orientations were
Specified it'll return Uiinterfaceorientationmaskall on an iPad and
Uiinterfaceorientationmaskallbutupsidedown on a phone. The return value
Should be one of the Uiinterfaceorientationmask values which indicates the
Orientations supported by this application.
-(Nsuinteger) Supportedinterfaceorientationsforwindow: (UIWindow *) window Ns_available_ios (6_0);
2nd, through the deployment info Device Orientation Select the orientation, of course, here and Plist file supported interface orientations corresponding to the same orientation, Change one place and another will change.
The 3rd kind, the single set VC to do the support orientation. Via function (after IOS 6.0)
-(BOOL) shouldautorotate{
return YES;
}
-(Nsuinteger) supportedinterfaceorientations{
return uiinterfaceorientationmasklandscape;
}
You can set the direction supported by the current VC.
The orientation supported by the final view is determined by the intersection of these 3. Note that the directions supported in the Plist file are executed according to the first item. (If supported)
Reference: Http://www.tuicool.com/articles/e2q6zi, Image: Horizontal screen layout. png
About support for screen orientation in iOS