NSSplitView: Many subviews and ViewControllers, best practices
NSSplitView: Many subviews and ViewControllers, best practices
- Subject: NSSplitView: Many subviews and ViewControllers, best practices
- From: Trygve Inda <email@hidden>
- Date: Tue, 21 May 2013 01:39:49 -0700
- Thread-topic: NSSplitView: Many subviews and ViewControllers, best practices
I have an NSDocument-based app.
The NSDocument's window has at it's root, an NSSplitView with 7 separate
panes/subviews... A Source list on the left and several panes to the right
with horizontal and vertical splits.
In one pane, I need to have three different views supported by an NSBox that
I can swap the views out (for icon, thumbnail and list view modes). These
views all need access to the same NSArrayController.
What is the best way to structure this?
Should I have an NSViewController and nib for each pane?
Should the pane-views be in the Document Nib with classes for each one to
act as a controller (with an outlet to a view)?
I currently do it this way but use a subclass of NSSObject rather than
NSViewController since NSViewController seems to want to load it's views
from a nib rather than having a bunch of views lumped together in a main
nib.
Thoughts?
I'll end up with SourceListViewController, DetailViewController,
ListViewController etc.
All these need to be aware of each other... Just wondering the best place to
store the views themselves in IB... Separate nibs or all in one nib with
outlets to find the views when needed.
Thanks.
_______________________________________________
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