Times of calling application:didFinishLaunchingWit

2019-05-16 23:45发布

问题:

Subj.

In iOS 5.x I have the next consequence of methods calling:

-[UIViewController initWithCoder:]
-[UIApplicationDelegate didFinishLaunchingWithOptions:]
-[UIViewController viewDidLoad]
-[UIViewController viewWillAppear:]
-[UIViewController viewDidAppear:]

But in iOS 6.x it's the next:

-[UIViewController initWithCoder:]
-[UIViewController viewDidLoad]
-[UIViewController viewWillAppear:]
-[UIApplicationDelegate didFinishLaunchingWithOptions:]
-[UIViewController viewDidAppear:]

So... what I gonna do? It's my fault or Apple have changed some logic?

回答1:

in your main.m

return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));