This is the case. When I hand operation on the iPad screen, when for some reason, I need to set the screen rotation NO, that
- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) toInterfaceOrientation
{
return NO;
}
If I am in the process of doing the operation while rotating iPad, such as the portrait into a lateral, because I've already set up a NO, so there is no rotation of the screen.
When I wanted to finish the operation, hands off. Then return value shouldAutorotateToInterfaceOrientation need to set YES. But if the time
Not a hand to rotate iPad, it is not automatically rotated. Do not enter shouldAutorotateToInterfaceOrientation function.
There is no way to do without a hand to turn iPad, use the code to allow screen rotation? ?
Reply:
Or the first clear logical reason it weighs
Reply:
The need to rotate when the notification is sent, so that you can rotate the trigger.
[[NSNotificationCenter defaultCenter] postNotificationName: UIDeviceOrientationDidChangeNotification object: nil];
Reply:
Why in the hand operation to rotating equipment, you want to rotate the view directly with code rotating trying it.
view setTransform: CGAffineTransformMakeRotation (M_PI / 2)
Reply:
This is it
No comments:
Post a Comment