I am used to performing app initialization in applicationDidFinishLaunching
in iOS, but in appKit it is getting called after the main view's draw
method! It is too early to draw anything since the app hasn't been initialized. Here is the order:
viewDidLoad
(main view controller)draw(_ dirtyRect:)
(view of main controller)applicationDidFinishLaunching
(too late!)
The API reference says the following about applicationDidFinishLaunching
This method is called after the application’s main run loop has been started but before it has processed any events.
Thus a draw event should be posted after applicationDidFinishLaunching
.
I am not used to this behavior -- what is going on?