Rotation of NIBs
I've been digging at this for a few days and can't seem to figure it out.
My app launches in landscape and supports only landscape orientations. Works fine.
My app delegate instantiates a root view controller, view is built from an XIB and populated with an image in viewDidLoad. The underlying image is landscape size (1024x768). Looks fine on the screen.
Once the app is launched, I wait for user interaction, and then present a new view controller along with a new view from a new XIB. This second vc/XIB is also landscape (as specified in interface builder). For practical purposes my first and second XIBs are near identical - both landscape views containing one imageview outlet occupying the entire screen.
I'm using off-the-shelf UIAnimationTransistion when I move between my root view (basically a splash screen/menu) and my first real content view. My problem is that, no matter what I do, the first animation transition is generated as if the view is in portrait mode. If I specify a left flip, it flips top to bottom. If I specify a right flip, it flips bottom to top. If I specify a curl up, it curls horizontally.
Once I've transistioned into my second view controller (where most of my apps content is), all the animations work exactly as they should.
How can I get the first view that is loa开发者_运维百科ded (from my rvc) to orient itself properly so that my animations are consistent moving between this first rvc and the second content vc?
Like jmont said, it could be a -shouldAutoRotateToInterfaceOrientation problem. It could also be that you need to specify 'InitialInterfaceOrientation' in the info.plist with a value of 'Landscape (left home button)' or 'Landscape (right home button)'. The last possibility would be to directly set the interface orientation.
精彩评论