Renaissance Lifecycle
Load markup programmatically during controller initialization, by calling -[NSBundle loadGSMarkupNamed:owner:]. The file’s #NSOwner reference is set to the object you pass as the owner. Call this method at the following points in your app’s lifecycle:
- To set the main menu, load markup that defines the menu after you initialize the app delegate, but before you call
NSApplicationMain. - To create UI that’s owned by the app delegate, load markup in your app delegate’s
-applicationDidFinishLaunching:method. - To create UI that’s owned by a controller, for example an
NSWindowController, load markup in the controller’s-initmethod. Don’t call methods that load other types of view files, for example,initWithWindowNibName:.
When Renaissance initializes and configures the view based on the contents of the markup file, it sends every object the -awakeFromGSMarkup message. Override this message to perform any actions after the view is configured and before someone interacts with it. Objects might receive other methods, like -windowDidLoad or -viewDidLoad, before Renaissance configures all of their connections.
Tags:
