Shouldautorotatetointerfaceorientation is set to deprecated in IOS 6.0. You need to append the supportedinterfaceorientations method to respond to the screen response.
In IOS 6.0, the orientation of supportedinterfaceorientations must exist in supported interface orientations of plist and must correspond to each other. Otherwise, an error is reported.
Before IOS 6.0, it can be forcibly specified regardless of whether the plist exists. Therefore, you must first determine the device version number and read the supported directions in supported interface orientations in plist to set the rotation direction.
Append the two methods for processing. The view can be displayed on the horizontal screen when the vertical device is located.
-(Bool) Events :( uiinterfaceorientation) tointerfaceorientation {return (tointerfaceorientation = uiinterfaceorientationlandscaperight);}-(nsuinteger) supportedinterfaceorientations {return requests ;}