ViewController has wrong orientation after Landscape-only has been popped
Posted
by noroom
on Stack Overflow
See other posts from Stack Overflow
or by noroom
Published on 2010-01-19T13:37:39Z
Indexed on
2010/05/01
10:37 UTC
Read the original article
Hit count: 301
In a navigation-based app, LandscapeViewController only supports landscape mode (all others support both modes). I also have a "loading screen" that advises the user to rotate the phone before continuing. This way I can make sure that when my landscape view loads, that it's in landscape mode.
The problem comes when i rotate the phone to portrait mode while still showing LandscapeVC. I press the Back nagivation button to navigate up one level (to a VC that supports both landscape and portrait modes), but the upper level shows in landscape mode even though the phone is in portrait mode. I guess this is because when I left this view I was in portrait mode, I then rotated the phone while in another view, so this view has not received the notification. If I then proceed to rotate the phone to the other landscape mode (say the LandscapeVC was loaded on its right side, so I'd rotate the upper VC from portrait to the left landscape mode), it will update.
My question is: how can I notify this upper view that the phone was rotated, so when the user goes up after putting the phone in portrait mode, the upper view shows correctly?
© Stack Overflow or respective owner