Re: Landscape view drawing as if in portrait mode
Re: Landscape view drawing as if in portrait mode
- Subject: Re: Landscape view drawing as if in portrait mode
- From: Ian was here <email@hidden>
- Date: Sun, 10 Jan 2010 09:42:04 -0800 (PST)
By releasing the view controller's view and replacing it with a new one, I was losing the landscape translate coordinates, causing them to reset to their default (portrait).
The solution is to setup the view controller with its default view at startup to landscape, then add the desired view as a subview, removing it when a new view needs to be added.
Thanks guys.
--- On Sun, 1/3/10, Matt Neuburg <email@hidden> wrote:
> From: Matt Neuburg <email@hidden>
> Subject: Re: Landscape view drawing as if in portrait mode
> To: "Ian was here" <email@hidden>
> Cc: email@hidden
> Date: Sunday, January 3, 2010, 12:09 PM
> On Thu, 31 Dec 2009 23:49:54 -0800
> (PST), Ian was here <email@hidden>
> said:
> >It works fine when I initially attach a view to the
> view controller, but when
> releasing it and attaching a new view, it screws up.
>
> There may be some larger misconception at work here. You
> should not be
> "releasing" a view controller's view and "attaching a new
> view". One view
> controller, one view. Let each view controller manage its
> view; you manage
> the view controllers. For a new view, make a new view
> controller. Okay, I've
> said the same thing several different ways now. :)
>
> Also, it might help to be aware of the discussion we
> (meaning I) just had
> here on the topic of iPhone apps that are autorotated at
> startup. The
> problem here is that loadView / viewDidLoad are too soon to
> do anything
> relating to the interface; you must wait until didRotate...
> arrives (and the
> docs fail to warn of this). m.
>
> --
> matt neuburg, phd = email@hidden,
> <http://www.tidbits.com/matt/>
> A fool + a tool + an autorelease pool = cool!
> AppleScript: the Definitive Guide - Second Edition!
> http://www.tidbits.com/matt/default.html#applescriptthings
>
>
>
>
_______________________________________________
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