Re: Problem drawing in landscape orientation when using an addition UIWindow
Re: Problem drawing in landscape orientation when using an addition UIWindow
- Subject: Re: Problem drawing in landscape orientation when using an addition UIWindow
- From: Markus Spoettl <email@hidden>
- Date: Fri, 29 Mar 2013 23:29:20 +0100
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@hidden)
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:
This email sent to email@hidden