The reason I have been doing it is because of a problem I have been having with 
moving a View. Maybe you could help me with that?
The View is supposed to move as my touch moves but the view seems to flicker 
between to places, as you can see here.
And this is the code I have been using.
--
Joshua Garnham


________________________________
From: David Duncan <david.dun...@apple.com>
To: Joshua Garnham <joshua.garn...@yahoo.co.uk>
Cc: cocoa-dev@lists.apple.com
Sent: Thu, 22 April, 2010 17:12:08
Subject: Re: App is in Landscape Mode, but main UIWindow still thinks it’s 
portrait.

On Apr 22, 2010, at 8:35 AM, Joshua Garnham wrote:

> My App runs in landscape mode and I have been converting a CGPoint
> to the main UIWindow's co-ordinate system. 

Why? There should generally be no need to convert to the window's coordinate 
system.

> UIWindow's co-ordinate system the co-ordinates changed as if the iPhone was 
> in portrait mode. 

Thats because the window itself doesn't actually change coordinate systems, it 
applies a transform to its subviews that changes their coordinate system.

> Code and Debugger results are as follows.
> - 
> (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
>  {
>    [[UIApplication sharedApplication] setStatusBarOrientation: 
> UIInterfaceOrientationLandscapeLeft];    
>    return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
> }

Also note that you should not be changing the status bar orientation here. It 
is sufficient to simply return YES for the orientations that you want (assuming 
that you've done everything else correctly).
--
David Duncan
Apple DTS Animation and Printing



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to