Is it possible to turn off the animation for the autorotation? I want it to rotate, but I just dont want the animation to occur (like an instant switch).
If you really need to, just use setAnimationsEnabled
of UIView
:
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
[UIView setAnimationsEnabled:NO]; // disable animations temporarily
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
[UIView setAnimationsEnabled:YES]; // rotation finished, re-enable them
}
It does the trick for me. Of course it's not recommended to do this unless you have a very good reason to do it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With