This question already has answers here:
Closed 8 years ago.
Possible Duplicate:
viewDidLoad in NSViewController?
I started development on iOS apps and am now moving to Mac OS X apps. I was wondering if there's an equivalent method in Mac OS X that is like iOS's viewDidLoad to run code after a View Controller launches.
Thank you!
From the Apple Release Notes:
Advice for People who Are Looking for
-viewWillLoad and -viewDidLoad Methods in NSViewController
Even though NSWindowController has
-windowWillLoad and -windowDidLoad methods for you to override the
NSViewController class introduced in
Mac OS 10.5 does not have
corresponding -viewWillLoad and
-viewDidLoad methods. You can override -[NSViewController loadView] to customize what happens immediately
before or immediately after nib
loading done by a view controller.