• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: View swapping questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: View swapping questions


  • Subject: Re: View swapping questions
  • From: Andy Lee <email@hidden>
  • Date: Tue, 4 Nov 2008 13:32:52 -0500

Also if you take this approach remember to retain oldView -- it will get released when you replace it with newView.

--Andy

On Nov 4, 2008, at 1:24 PM, Volker in Lists wrote:

Hi Robert,

sounds reasonable, but no need to store any control states as far as I can tell (they are not released, just "taken out of view"). There is an example available demonstrating this w/ some nice CoreAnimation transition > BasicCocoaAnimations found on the online developer example area.

Volker

Am 04.11.2008 um 19:00 schrieb Robert Mullen:

I am attempting to swap views somewhat like XCode does between project and debug modes. This is being done to an existing project that has the main windows content view set in IB. I have tried to store the initial view before replacing it with the new view using code similar to this:

oldView = [window contentView];
[window setContentView:newView];

and then swapping them back out on a segmented cell action

[window setContentView:oldView];

This is pseudo code with the actual views being linked up via IB so it may not be perfect but I am trying to understand conceptually if this should work. I do need to preserve the state of the controls in both views so that toggling back and forth brings you to the same exact view as before.

Am I barking up the wrong tree?

TIA
_______________________________________________

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

_______________________________________________

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

_______________________________________________

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


References: 
 >View swapping questions (From: Robert Mullen <email@hidden>)
 >Re: View swapping questions (From: Volker in Lists <email@hidden>)

  • Prev by Date: Re: Key Paths @count and mutablestrings
  • Next by Date: Re: View swapping questions
  • Previous by thread: Re: View swapping questions
  • Next by thread: Re: View swapping questions
  • Index(es):
    • Date
    • Thread