UINavigationController transforms
Standalone view controllers can be rotated to landscape easily by applying
(in viewDidLoad)
[self.view setTransform:CGAffineMakeRotation(-M_PI/2)]
The rotation occurs about the center of the screen and it's wonderful.
However, when the viewcontroller belongs to a UINavigationController, rotations occur about the topleft corner of a portrait window and setting the center of the view doesn't change the center of rotation. I've also tried using a CGAffineTranslate call to achieve the effect of rotating about the center but it appears to make no difference. Is this a bug with the sdk/simulator (I haven't got an iphone yet)? Better yet, is there a workaround?
|