Development always encounter a specific page need to screen the problem, here is recommended that the following steps to easily solve the problem:
1. In targets-->general-->deployment Info-->device orientation will need to use the direction of all hook
2. Customize a Uinavigationcontroller and then match the Navigationcontroller in the Xib or storyboard
3. Under the. m file in the custom Nav, override both methods as follows:
Whether the screen is allowed to rotate
-(BOOL) shouldautorotate
{
if ([self. Topviewcontroller iskindofclass: [***VC(VC requiring special handling) class]]) {
return YES;
}
return NO;
}
Direction of rotation allowed (enumeration value, command point in select on line)
-(nsuinteger) supportedinterfaceorientations
{
return uiinterfaceorientationmaskallbutupsidedown;
}
4. Wrap Up
iOS free to control the screen vertically