Re: NSWindowControllers and NSWindow
Re: NSWindowControllers and NSWindow
- Subject: Re: NSWindowControllers and NSWindow
- From: Roland King <email@hidden>
- Date: Tue, 17 Feb 2015 07:16:04 +0800
> On 17 Feb 2015, at 5:59 am, Quincey Morris <email@hidden> wrote:
>
>> 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.
> ...
> 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.
And storyboards did away with the concept of Files Owner as well. Now the view- or window-controller is in the XIB that's what you usually connect to. This was probably the most common practice anyway so it makes some sense.
Coming from iOS (jeers from the gallery) I quite like storyboards on OSX too and they support all the embedding and other segues which make hooking up the scenes of an app quite intuitive. For odd views, especially those which really want a non-controller files owner, I still make a NIB and I don't expect that to be going away any time soon.
_______________________________________________
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