Re: How to instantiate WindowController in xib
Re: How to instantiate WindowController in xib
- Subject: Re: How to instantiate WindowController in xib
- From: Alex Zavatone <email@hidden>
- Date: Tue, 22 Nov 2016 11:47:28 -0600
As an aside, I remember reading the iOS (I know this is not iOS) UIViewController header file recently and back in XCode 3.x it must have been the Mac's equivalent and it states that if there is no view for the viewController, that it will attempt to load a nib of the same class name of the viewController automagically.
I wonder what the header file for a WindowController says about the same thing?
Sent from my iPhone
> On Nov 22, 2016, at 9:40 AM, Andy Lee <email@hidden> wrote:
>
>> On Tue, Nov 22, 2016, at 09:45 AM, Stéphane Sudre wrote:
>> the windowNibName property should be set by your subclass of NSWindowController (by implementing the - (NSString *) windowNibName; method usually).
>
> You can also specify it in IB by going to the Identity Inspector (Command-Option-3 -- the pane where you specify the object's Custom Class) and adding to "User Defined Runtime Attributes", using windowNibName as the key path and the nib name as the value.
>
> One case where you might prefer to do this is if you don't have any other reason to subclass NSWindowController (for example, all the "real" behavior might be in view controllers that live in the window's nib). IMO this would be a matter of personal taste -- you might prefer to subclass NSWindowController even if it's only to override windowNibName.
>
> --Andy
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden