Reputation: 1098
I just learned my applicationDidFinishLaunching
was not being triggered. Doing a search around here, it seems I need to set my AppDelegate
as a delegate
of my main window.
The answers here explain how to do it in IB with main.xib. I'm on Xcode 4.3.2 using storyboard. How do I do the same in storyboard?
Thanks.
Upvotes: 0
Views: 769
Reputation:
No. You don't set the app delegate as a delegate of the main window but the shared UIApplication instance (in the other case it would be called window delegate). You'd better change your main()
function; call
int retVal = UIApplicationMain(argc, argv, nil, @"MyAppDelegateClass");
instead of the default
int retVal = UIApplicationMain(argc, argv, nil, nil);
call.
Also note that applicationDidFinishLaunching
is deprecated. You may need to transition to the new
application:didFinishWithLaunching:
delegate method.
Upvotes: 3