views:

206

answers:

1

My app is going from a flipside view (only one orientation) to its main view (can have any sort of orientation. When I go from flipside back to main view, the main view's orientation is not checked and changed immediately.

I need a way to trigger the built in orientation check that happens in willRotateToInterfaceOrientation so that the orientation is correct when the user goes from flipside view to main view. Any help is appreciated.

I saw another question about this but didn't see a definitive answer.

Thanks!

A: 

Unfortunately, there are no ways for that in current iPhone OS.

The main reason is that the result of shouldAutorotateToInterfaceOrientation: is cached, so you must not change its result runtime. So if you flip to another view in the same view controller, it won't change orientation no matter what you do (or it will, but will work improperly later).

I suggest using a modal view controller instead. You won't be able to show a flipping animation then (or not easily), but the orientation changes should work fine.

gyim
The Apple's proof way is to use a modal view controller (as gyim said). Check the sample code: something like "multiple views", ...
marcio