• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: viewDidLoad not called for an NSViewController's subclass (separate XIB)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: viewDidLoad not called for an NSViewController's subclass (separate XIB)


  • Subject: Re: viewDidLoad not called for an NSViewController's subclass (separate XIB)
  • From: Nick <email@hidden>
  • Date: Sun, 25 Oct 2015 10:36:36 +0200
  • X_v_e_cd: 71d9ec740a8cf315d3b2fe2bca49d821
  • X_v_r_cd: 7463e7f163736e7e16bfc417a731a961

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 <email@hidden>:

> On Oct 25, 2015, at 1:58 AM, Nick <email@hidden> 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 (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


References: 
 >viewDidLoad not called for an NSViewController's subclass (separate XIB) (From: Nick <email@hidden>)
 >Re: viewDidLoad not called for an NSViewController's subclass (separate XIB) (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: viewDidLoad not called for an NSViewController's subclass (separate XIB)
  • Next by Date: Re: NSSplitView in a separate NSWindowControl doesn't show for some reason
  • Previous by thread: Re: viewDidLoad not called for an NSViewController's subclass (separate XIB)
  • Next by thread: Scripting Bridge Question.....
  • Index(es):
    • Date
    • Thread