zoukankan      html  css  js  c++  java
  • iOS各种系统通知Name

    当了一次搬运工,原地址:http://blog.csdn.net/db905517804/article/details/50569949

    用法:

    - (void) viewWillAppear:(BOOL)animated{
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appWillEnterForegroundNotification) name:UIApplicationWillEnterForegroundNotification object:nil];  
    }  
      
      
    - (void) appWillEnterForegroundNotification{  
        NSLog(@"trigger event when will enter foreground.");  
    }  

    一、键盘
    1、UIKeyboardWillShowNotification-将要弹出键盘
    2、UIKeyboardDidShowNotification-显示键盘
    3、UIKeyboardWillHideNotification-将要隐藏键盘
    4、UIKeyboardDidHideNotification-键盘已经隐藏
    5、UIKeyboardWillChangeFrameNotification-键盘将要改变frame
    6、UIKeyboardDidChangeFrameNotification-键盘已经改变frame

    二、窗口
    1、UIWindowDidBecomeVisibleNotification-窗口可见
    2、UIWindowDidBecomeHiddenNotification-窗口隐藏
    3、UIWindowDidBecomeKeyNotification
    4、UIWindowDidResignKeyNotification


    三、程序消息
    1、UIApplicationDidBecomeActiveNotification-程序从后台激活
    2、UIApplicationDidChangeStatusBarFrameNotification-状态栏frame改变
    3、UIApplicationDidChangeStatusBarOrientationNotification-状态栏方向改变
    4、UIApplicationDidEnterBackgroundNotification-进入后台
    5、UIApplicationDidFinishLaunchingNotification-程序加载完成
    6、UIApplicationDidReceiveMemoryWarningNotification-内存警告
    7、UIApplicationProtectedDataDidBecomeAvailable
    8、UIApplicationProtectedDataWillBecomeUnavailable
    9、UIApplicationSignificantTimeChangeNotification 重要的时间变化(新的一天开始或时区变化)
    10、UIApplicationWillChangeStatusBarOrientationNotification-将要改变状态栏方向
    11、UIApplicationWillChangeStatusBarFrameNotification-将要改变状态栏frame
    12、UIApplicationWillEnterForegroundNotification
    13、UIApplicationWillResignActiveNotification
    14、UIApplicationWillTerminateNotification

    四、电池、方向、传感器
    1、UIDeviceBatteryLevelDidChangeNotification //电池电量
    2、UIDeviceBatteryStateDidChangeNotification //电池状态
    3、UIDeviceOrientationDidChangeNotification //方向
    4、UIDeviceProximityStateDidChangeNotification //近距离传感器

    五、音视频
    1、MPMediaLibraryDidChangeNotification
    2、MPMusicPlayerControllerPlaybackStateDidChangeNotification
    3、MPMusicPlayerControllerNowPlayingItemDidChangeNotification
    4、MPMusicPlayerControllerVolumeDidChangeNotification

    六、其他
    1、NSUserDefaultsDidChangeNotification 用户默认设置变化
    2 NSCurrentLocaleDidChangeNotification 本地化语言变化

  • 相关阅读:
    ORACLE CASE WHEN 及 SELECT CASE WHEN的用法
    Oracle中NVARCHAR2字符集不匹配问题
    数据库读写分离
    oracle存储过程获取异常信息码和异常信息
    js删除字符串的最后一个字符三种方法
    我弄的一些TASKER配置
    分享我用Taker做任务时需要的各种资源的精华帖,方便查阅
    Tasker 正则表达式测试器
    支持Tasker控制的app合集
    Tasker文件夹说明
  • 原文地址:https://www.cnblogs.com/kongkaikai/p/5830001.html
Copyright © 2011-2022 走看看