I have a ViewController which controls a view that needs a different layout in landscape mode than in portrait mode. I made two .xib files that are semantically identical but have different layouts. I know there is a hack to display a second ViewController modally when in landscape mode, but I'd really rather just re-initialize the view controller with the other nib file when switching orientations.
I have it half working. When I turn the device while looking at the (tab bar) view in question, it disappears (The page, not the device!). But when I switch to another tab and come back to the view in question, it displays as I want it to.
How can I switch nibs, while looking at the view I'm going to re-layout, and not have it disappear?
Right now I'm doing the orientation sensing in -didRotateFromInterfaceOrientation: and also in -viewDidAppear:. I set self.view = nil and call initWithNibName:bundle:. Can this be made to work in a reasonable way or do I have to resort to the modal hack.