I've been working on this for days and can't crack it. The sequence of events is:
- In landscape (let's just say right), the user hits an "edit" button.
- A portrait only modal interface slides in. Its shouldAutorotateToInterfaceOrientation returns yes only for portrait.
- The device becomes convinced it is in portrait mode.
- Problem 1: If the user dismisses the interface without having actually rotated to portrait mode, the device reports that is in landscape right orientation (which it is), but the interface is laid out in portrait orientation.
- Problem 2: If the user rotates to portrait, the interface does not get laid out again.
- Problem 3: (And this one is weird) Rotating back to the same landscape orientation (right) where the edit button was pressed causes the status bar to return to landscape, but nothing else changes. All my stuff remains laid out in portrait mode. Rotating to the other (left) landscape orientation works perfect.
I need some way to force the layout engine to redo the layout for the orientation the device is actually in.
UIView - layoutSubviews, - setNeedsLayout, and -layoutIfNeeded don't have any effect.
Thanks for any help.