for a device with a different version number, rotate the view to make the corresponding rotation, then the version is different, how the code is implemented, how to limit the direction of rotation ? here is a small series of personal views!
Version number is 3.5-5.0
-(BOOL) Shouldautorotatetointerfaceorientation: (uiinterfaceorientation) tointerfaceorientation
{
return NO; Rotation is not supported with multiple rotation of the device;
Return (tointerfaceaorientation! = uiinterfaceorientationlandscapeleft);//When the Power key-end rotation direction left is the view does not rotate
}
When the version number is above 6.0
-(BOOL) shouldautorotate
{
return YES;
}
-(nsuinteger) supportedinterfaceorientations
{
return uiinterfaceorientationmaskallbutupsidedown;
}
If you have questions and different views, please add qq:1649419270 number: Meixianlyd
XCODE shouldautorotatetointerfaceorientation implementation of the corresponding rotation direction of the view when different versions of the device are rotated in different directions