On 3/29/13 8:54 PM, Laurent Daudelin wrote:
The only problem is when you rotate an iPhone in landscape mode, even when
the sheet is not up. It uses a subclass of UIWindow to do its thing and after
reading on the subject, it seems that UIWindow's never rotate and they always
work as if in portrait mode. I read that the rootViewController of the
UIWindow will take care of rotation. I tried very late yesterday to insert a
basic rootViewController for that UIWindow subclass but it didn't work. I'm
obviously missing a few parts here and there.

First you need to observe the UIApplicationDidChangeStatusBarFrameNotification notification (via NSNotificationCenter) and when you get one of those, set up a transform that rotates the window accordingly.

One way of doing it, is described here:

http://stackoverflow.com/questions/6697605/iphone-uiwindow-rotating-depending-on-current-orientation

Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to