View swapping questions
View swapping questions
- Subject: View swapping questions
- From: Robert Mullen <email@hidden>
- Date: Tue, 4 Nov 2008 10:00:18 -0800
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