zoukankan      html  css  js  c++  java
  • UIApplicationDelegate里面最常用的几个函数执行顺序小结

    (1)点击桌面图标正常启动App或者杀死进程后点击推送消息启动App

    1.application:willFinishLaunchingWithOptions
    
    2.application:application:didFinishLaunchingWithOptions
    
    3.applicationDidBecomeActive
    
    4.application:didRegisterForRemoteNotificationsWithDeviceToken

     

    (2)拖下通知中心/双击Home键使App界面上移

    applicationWillResignActive

     

    3)拖上通知中心/使App界面恢复原位

    applicationDidBecomeActive

     

    4)按Home键使App进入后台

    1.applicationWillResignActive
    
    2.applicationDidEnterBackground 

     

    5)点击App图标,使App从后台恢复至前台

    1.applicationWillEnterForeground
    
    2.applicationDidBecomeActive

     

    6)点击通知中心里面的远程推送,使App从后台进入前台

    1.applicationWillEnterForeground
    
    2.application:didReceiveRemoteNotification
    
    3.applicationDidBecomeActive

     

    (7)按住减号图标杀死App进程

    applicationWillTerminate

     

    (8)从APP切换到微信之类的其他应用之后,再切换回来时

    1.applicationWillEnterForeground
    
    2.application:openURL:sourceApplication
    
    3.applicationDidBecomeActive

     

    :当程序处于后台时,点击推送消息进入前台会执行application:didReceiveRemoteNotification,但直接点击推送消息启动App是不会执行该didReceiveRemoteNotification的,在didFinishLaunchingWithOptionsoptions里面已经有数据表明当前是直接启动还是点击推送消息启动,localNotification与remote类似,略。

  • 相关阅读:
    hadoop的权限控制
    linux ssh连接超时断连设置
    PuTTY + Xming 远程使用 Linux GUI
    linux系统用户下的crontab任务不执行问题处理
    shell编程注意点
    启动VMware出现报错:The VMware Authorization Service is not running
    mul8_unsigned multipliter
    mul16
    C#基础精华06(Linq To XML,读取xml文件,写入xml)
    C#基础精华05(正则表达式,)
  • 原文地址:https://www.cnblogs.com/gugupluto/p/3442191.html
Copyright © 2011-2022 走看看