Re: Creating NSViewController with -init.
Re: Creating NSViewController with -init.
- Subject: Re: Creating NSViewController with -init.
- From: Seth Willits <email@hidden>
- Date: Mon, 24 Mar 2014 18:36:21 -0700
General advice from my experience:
1. My standard practice has always been to simply override nibName, and call alloc] init]. The majority of the time, view-related properties that need to created that you might normally stick in -initXYZ, I put in -loadView after calling super. (Burn awakeFromNib with fire.)
2. Either call initWithNibName:bundle: or override nibName. Don't rely on NSVC being smart and appropriately grabbing a file with the desired name. Offhand, I believe this is documented to be supported on iOS, but no such documentation or feature exists on OS X. I've (accidentally) experienced it picking a nib automatically on OS X, but it was always picking the wrong nib.
--
Seth Willits
_______________________________________________
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