What does didFinishLaunchingWithOptions do?
What does didFinishLaunchin开发者_高级运维gWithOptions` do and when should it be invoked?.
Also, I am looking for a diagram like the "Activity Life cycle" diagram in Android. If you know please share.
The app delegate is equal to the application delegate in Android and the view lifecycle callbacks equals the Activity lifecycle callbacks.
(You may have to scroll some of the page though)
Here are the lifecycle for views: http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/BasicViewControllers/BasicViewControllers.html
Here are the lifecycle for application (app delegate): http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/CoreApplication/CoreApplication.html
For lifecycle:
For delegate methods call:
http://www.cocoanetics.com/2010/07/understanding-ios-4-backgrounding-and-delegate-messaging/
for detailed delegate messaging (from apple)
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html
By the way just a WARNING.
If you are planning to do some remote connection ( api call ) or hard calculation in that method just don't.
Because for responsiveness issues iOS only gives a limited amount of time to every application to finish didFinishLaunchingWithOptions
(like ten seconds) if you do not return. Than it will just kill your application
精彩评论