美文网首页
iOS 生命周期

iOS 生命周期

作者: NapoleonY | 来源:发表于2017-12-28 16:52 被阅读3次
    1. 启动后
      func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
      
      func applicationDidBecomeActive(_ application: UIApplication)
      
    2. 双击home键
      - (void)applicationWillResignActive:(UIApplication *)application
      
    3. 双击home键后,点击home键回到app
    func applicationDidBecomeActive(_ application: UIApplication)
    
    1. 点击home键,app进入后台
    func applicationWillResignActive(_ application: UIApplication)
    
    func applicationDidEnterBackground(_ application: UIApplication)
    
    1. 从后台返回到app
    func applicationWillEnterForeground(_ application: UIApplication)
    
    func applicationDidBecomeActive(_ application: UIApplication)
    
    1. 当把app推出时,会调用
    - (void)applicationWillTerminate:(UIApplication *)application
    

    相关文章

      网友评论

          本文标题:iOS 生命周期

          本文链接:https://www.haomeiwen.com/subject/mhsvgxtx.html