1

life cycle methods (viewDidLoad, viewWillAppear, viewDidAppear etc) are available since OSX 10.10 Yosemite. Then how to used viewWillAppear in OSX 10.8,10.9 is there any other options for Lower version OS.

Sangram Shivankar
  • 3,535
  • 3
  • 26
  • 38

1 Answers1

0

These lifecycle methods are used in NSViewController class. In order to achieve similar functionality you could use NSWindowController's windowDidLoad and windowWillLoad methods.

Keep in mind that you (if you use Apple's MVC) will also have to move all your view logic from NSViewControllers to NSWindowControllers since ViewControllers do not participate in the responder chain on APIs earlier than 10.10.

Dmitry Serov
  • 861
  • 11
  • 22