iPhone – UIWindow rotating depending on current orientation?
You need to roll your own for UIWindow. Listen for UIApplicationDidChangeStatusBarFrameNotification notifications, and then set the the transform when the status bar changes. You can read the current orientation from -[UIApplication statusBarOrientation], and calculate the transform like this: #define DegreesToRadians(degrees) (degrees * M_PI / 180) – (CGAffineTransform)transformForOrientation:(UIInterfaceOrientation)orientation { switch (orientation) { case UIInterfaceOrientationLandscapeLeft: return CGAffineTransformMakeRotation(-DegreesToRadians(90)); … Read more