I have a NSDocument based application with a nib that represents the visual document. As soon as the view Appeared I want to trigger some actions.
For a “normal” UIViewController I would simply override viewDidAppear:. However, NSDocument does not have this method, even though it has a view per document.
NSDocumentoffers-(void)windowControllerDidLoadNib:(NSWindowController *)aController;method.I think this is what you are looking for.
The document window controllers are still accessible using
NSDocument‘swindowControllersmethod.If you have more precise requirements on window appearing/disappearing, becoming key, etc…, you could handle that with window notifications, or window delegation system.