My documentation says:
Add the codes below into the applicationDidFini开发者_运维技巧shLaunching function... -(void)applicationDidFinishLaunching:(UIApplication *)application{
But I only see
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
Q: Are these two the same?
If not, where do I find the applicaitonDidFinishLaunching function?
Per the Apple documentation:
applicationDidFinishLaunching:
Tells the delegate when the application has finished launching.
-(void)applicationDidFinishLaunching:(UIApplication *)application
This method is used in earlier versions of iOS to initialize the application and prepare it to run. In iOS 3.0 and later, you should use the application:didFinishLaunchingWithOptions:
instead.
These are the same. The options have been added in the 4.0 SDK if I recall correctly.
Edit: it's been there since 3.0: http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intf/UIApplicationDelegate
精彩评论