views:

35

answers:

1

I have this UINavigationController-based iPad app that supports all 4 orientations. When I rotate the device, I'd like the background image to stay still and only have the UI on top of it get rearranged/rotated.

I've succeeeded by returning NO to the UIViewController shouldAutorotateToInterfaceOrientation: and handle the orientation myself using UIDeviceOrientationDidChangeNotification

Since only the current view gets rotated (and not the whole window), the UINavigationController push animation doesn't get adjusted. So when you're holding the iPad in landscape right, it pushes the view from the bottom. When you're holding it upside-down, it pushes the view from the left (it should always be from the right).

Any better way to have that background image remain steady while rotating everything else? Or fixing the UINavigationController push animation? I'd like to stick with the controllers if possible (ie not having to play around with manually animating view frames, etc).

A: 

As you have seen, UINavigationControllers are very particular about orientation.

I think you are probably better off rotating the background every time the interface is rotated.

Kendall Helmstetter Gelner
I was afraid it would look jaggy since I'm counter-rotating the background view while the whole window is rotating, but no. Totally does the job. Thanks!
Sam V