On Sep 9, 2010, at 7:32 AM, Daniel Lopes wrote:

> My idea for organization is separate the entire content on the left side in
> a new Nib called sidebar and set the FileOwner to a controller in Window
> Nib. Also do the same thing for the right part of the Split View.
> 
> That behavior the behavior to separate big "components" of the UI in
> diferent nib's is right? Create custom views for the header is a good
> pratice? I know this a big question but the answer will help me a lot.

That’s a perfectly reasonable way to organize your application, and pretty much 
why NSViewController exists.

You’d have, say, MySidebarController and MyContentController, both subclasses 
of NSViewController and with their own nibs, which you could instantiate in 
your NSWindowController subclass or its nib.  You’d get your NSViewController 
subclass’s views, and put them in or use them to replace the appropriate 
“placeholder” views in your main window.

Similarly, when it comes to doing things like creating custom views for things 
like headers, that’s how it’s done in Cocoa.  Custom drawing is done by 
subclassing, not by using drawing tools on a nib.

  -- Chris

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to