0

I've read the class reference on NSViewController, but I was still wondering if an instance is fully initialized when it calls viewDidLoad(), or if I should wait for viewWillAppear() or something else.

In particular, I'm using Xcode, and I want to call cellAtRow( x, Column:y ) on an NSMatrix that is connected as an Outlet. Where is the earliest point in the lifecycle I can be certain everything is fully configured? TY!

Charlweed
  • 1,517
  • 2
  • 14
  • 22
  • That depends a bit. From where does the matrix get its content? Is it configured at design time, statically in the NIB/storyboard? Is it using bindings? If so, to what is it bound and where does that get its content? – Ken Thomases Apr 09 '15 at 02:24

1 Answers1

0

NSViewControllers have a property called viewLoaded that is YES once [loadView] is complete. Since that's where the nib is usually loaded, it should be safe to operate on outlets then.

robinkunde
  • 1,005
  • 9
  • 12