views:

176

answers:

1

Hello,

I have a situation where I have a view, and several subviews, and the view and all but one of its subviews are expected to rotate. The one subview that I don't want to rotate is a UIImageView and the image gets distorted when I rotate so I need it to simply not rotate when the rest of the views components rotate.

Does anybody know of a way to achieve this? Is there some excludeFromRotating property I've overlooked?

Thanks!

A: 

When a viewController returns YES for the shoudAutoRotate, the UIViewControllers view is rotated, so all subViews are rotated. You can only make UIViewControllers not react to a rotation. A UIViev does not "know" it is being rotated.

You have to manually rotate the view 90 degrees counter to achieve the illusion that it is not rotating, and rotate it back when the iPhone goes back to portrait.

RickiG
I did something similar, I just loaded two versions of the image, one landscape and one portrait. When the view finishes rotating I swap out the portrait for landscape image.Thanks for your help.
jmurphy
That is probably much easier than rotating it:)
RickiG