Thanks Ken and Iowell!
(I saw loadView in some example once and thought it should be called)

2015-10-25 9:12 GMT+02:00 Ken Thomases <k...@codeweavers.com>:

> On Oct 25, 2015, at 1:58 AM, Nick <eveningn...@gmail.com> wrote:
>
> > I am having a weird problem that viewDidLoad isn't called. Actually it's
> > not a problem - I can use -awakeFromNib initializator instead, but I am
> > wondering why viewDidLoad is not called (as it is automatically generated
> > by xcode with a comment "place your initialization code here", when I
> > create a new View Controller with a XIB)?
>
> > - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
> >
> >    myVC = [[MyVC alloc] initWithNibName:@"MyVC" bundle:nil];
> >
> >    [myVC loadView];
> >
> >    self.window.contentView = myVC.view;
> > }
>
> From the docs for -[NSViewController loadView]:
>
> "Do not call this method. If you require this method to be called, access
> the view property."
>
> So, why are you calling -loadView?
>
> Regards,
> Ken
>
>
_______________________________________________

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

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

Reply via email to