/**
* Called when the screen is about to rotate
*
* @param tointerfaceorientation The final direction after the rotation is complete
* @param duration The time it takes to rotate the animation
*/
-(void) Willrotatetointerfaceorientation: (uiinterfaceorientation) tointerfaceorientation Duration: (NSTimeInterval ) duration
{
if (Uiinterfaceorientationislandscape (tointerfaceorientation)) {//Horizontal screen
} else {//Vertical screen
}
}
UIView width and Height auto scaling when screen is removed
Sometimes we do the screen switch, we set the controller frame is always not in accordance with the normal situation of change, may be due to the system to the wide and high automatic scaling effect, the removal system auto Scaling method is as follows:
MyController.view.autoresizingMask = Uiviewautoresizingnone;
The development of iOS to determine the screen switch