How to call shouldAutorotateToInterfaceOrientation manually?
Content of this function has on/off flag, so when I change this flag, I need to rotate screen.
Example:
- Disable flag
- Tilt phone in horizontal position. shouldAutorotateToInterfaceOrientation called and returns false
- Enable flag: shouldAutorotateToInterfaceOrientation must be called. How to call it?
If you are targeting iOS 5, you can call
[UIViewController attemptRotationToDeviceOrientation]which will call
shouldAutorotateToInterfaceOrientation:with the device’s current orientation and will rotate the interface if that method returnsYES.