Hi All!
I have a strange problem with the simulator (at least I think it is the simulator only).
When I change the orientation of the simulator, my viewcontroller's shouldAutorotateToInterfaceOrientation
-method gets 12 calls with every possible interfaceOrientation as argument.
I don't know why the methods gets called so often and more so, why with every interface orientation ? It doesn't make any sense, at least for me.
My app setup is like this:
- I have a tabbarcontroller with an navcontroller as base controller
- the problem occurs with an modalviewcontroller that takes the whole screen (fullscreen display) at presentation time
- the modalviewcontroller's view has one subview and the layer of this subview gets programmatically transformed (zooming) and the subview gets transformed (rotation) too.
- Now, when the view gets programmatically rotated with an CGTransformation to landscape orientation, and afterwards if I go through all device orientations with the simulator the above mentioned method gets several times called with every device orientation option.
Now my goal is to prohibit rotation if the rotation was already done programmatically (except if the new device orientation is the opposite side). An example: If I programmatically rotated the view to landscapeLeft, then the view should autorotate to landscapeRight only, and no rotation else.
Does anyone know what would cause this polling with every possible interface orientation with one change of the device orientation.
Thanks and best regards.