views:

56

answers:

1

Hi,

I am developing an iPad application which is basically a big drawing canvas with a couple of button at the side. (Doesn't sound very original, does it? :P)

No matter how the user holds the device, the canvas should remain in place and should not be rotated. The simplest way to achieve this would be to support just one orientation.

However, I would like the images on the buttons to rotate (like in the iPhone camera app) when the device is rotated. UIPopoverControllers should also use the users current orientation (and not appear sideways).

What is the best way to achieve this?

(I figured I could rotate the canvas back into place with an affineTransform, but I don't think it is ideal.)

Thanks in advance!

A: 

Just spouting off an idea (not sure if it would work or not)...

Perhaps you could have your screen controlled by a UIViewController that supports all orientations, but have the canvas be controlled by one that only supports a single orientation (ie, returns NO in its shouldAutorotate... method).

If that doesn't work, I'd probably just go with the affineTransform route.

Dave DeLong
As far as my experience tells, nesting UIViewControllers will not enable the "bottom" `UIViewController` to receive the autorotation methods. I would probably go with the `affineTransform`, too.
bddckr
@ChriB good to know! As I said, I wasn't sure if that would work or not. :)
Dave DeLong