Re: NSWindowControllers and NSWindow
Re: NSWindowControllers and NSWindow
- Subject: Re: NSWindowControllers and NSWindow
- From: Quincey Morris <email@hidden>
- Date: Mon, 16 Feb 2015 21:59:40 +0000
On Feb 16, 2015, at 12:30 , Ken Thomases <email@hidden> wrote:
>
> A view controller and its view should be reusable in different contexts, or at least designed as though it might be.
To round out the larger discussion for posterity, I’d add that when using an OS X storyboard, the picture is a little bit different.
In a storyboard, it’s probably not going to usual to split windows and views out into separate files, since the point of the storyboard is the integration of various large-scale UI elements (windows, views, controllers), and an important part of that integration is segues, which work within a storyboard.
(I say “probably” because I don’t think OS X storyboards are common enough yet for best practices to be well agreed on. Possibly, the most-agreed-on practice for OS X storyboards so far might be “don’t use them”, since developers who are used to old-school code workflows won’t see any particular advantage.)
The other thing that’s different: An OS X storyboard that contains a window will actually contain a window controller too, and at least a content view controller. When using XIBs, putting controllers in the XIB — though doable — is typically a code smell. In storyboards, it’s a necessity.
To be clear, I’m not suggesting that OS X storyboards are compelling yet, but I think they will be eventually. We need to start factoring them into our thinking.
_______________________________________________
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