Re: Swap subviews of NSSplitView?
Re: Swap subviews of NSSplitView?
- Subject: Re: Swap subviews of NSSplitView?
- From: Kevin Gessner <email@hidden>
- Date: Tue, 16 Dec 2008 20:14:53 -0500
On Dec 16, 2008, at 2:11 AM, Matt wrote:
I have an NSSplitView, divided vertically, with two table views. In a
certain instance I need to have a custom view class appear in place of
the right-hand NSTableView, retaining its auto-resizing and
spilt-view-resizing functionality. I need to be able to swap the
NSTableView (inside of the split view) for this custom view back and
forth as needed.
I searched for the solution but only found references to NSViews
-replaceSubview: with:, and it isn't working for me. Is this the
proper method to be using for such a task or should I be doing
something different?
I think the 'standard' way of swapping views is to place them both
into a tabless NSTabView, then switch the current tab
programmatically. In your case, the tabview would be the subview of
your splitview, and the custom view and table view would be tabs in
the tabview.
HTH,
-- Kevin
Kevin Gessner
http://kevingessner.com
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