2016-11-09 80 views

回答

0

您可以检查它像这样

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
    { 
     NSDictionary *notification = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; 
       if (notification) { 

       // it's launch from notification 


       } 
       else 
       { 
        // normal launch on app icon click 
       } 

    } 

的迅速PLZ使用本

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 

     if (launchOptions?[UIApplicationLaunchOptionsKey.remoteNotification] as? NSDictionary) != nil { 

      // it's launch from notification 
        } 
     else 
     { 
       // normal launch on app icon click 
     } 

     // Override point for customization after application launch. 
     return true 
    } 
相关问题