I have a view that is Landscape only (both).
It is displayed as a modal view controller.
On the iphone 5 (simulator, I haven’t tried a device yet), when the view displays it is sized to 320×480, instead of 320×568, and it’a aligned left.
BUT… if I rotate the simulator to the other landscape orientation, or to portrait and back again, it autoresizes correctly and fills out the screen.
I’d paste code if I knew exactly what to paste… but there’s so much involved here, I’m not sure where to start.
All of my other views resize just fine, but they are also all contained within UITabbarControllers or UINavigationControllers.
My short/gross/simple solution to the problem was simply to set the frame of my view to the main screen’s bounds.
As always… this can’t be done until the self.view actually loads so that it’s frame can be set! So I have to do this in – (void)viewDidAppear
I didn’t bother to detect a device since I ALWAYS want this view to be fullscreen no matter what the device (including iPad.
My guess is that the build in controllers (UINavigationController, etc…) have logic for detecting iPhone 5 and setting the frame bounds accordingly.
UPDATE: As is turns out, I had a larger issue. My main “Window” in the MainWindow.xib was not set to “Full Screen at Launch”. This is a check box Utilities view for the Window in the .xib
Because it wasn’t checked, my touch targets were also being masked outside of the bounds of the xib files 3:2 dimensions. Checking this box fix my touch targets AND fixed the screen filling issue in my question above. I removed the code in my original answer and the view fills the whole screen/window nicely because the “Window” is now the size of the screen.
Makes more sense now…