app退以后台,进入前台
2016-05-12 10:16
351 查看
// app退到后台
[[NSNotificationCenter
defaultCenter]
addObserver:self
selector:@selector(appDidEnterBackground)
name:UIApplicationWillResignActiveNotification
object:nil];
// app进入前台
[[NSNotificationCenter
defaultCenter]
addObserver:self
selector:@selector(appDidEnterPlayGround)
name:UIApplicationDidBecomeActiveNotification
object:nil];
[[NSNotificationCenter
defaultCenter]
addObserver:self
selector:@selector(appDidEnterBackground)
name:UIApplicationWillResignActiveNotification
object:nil];
// app进入前台
[[NSNotificationCenter
defaultCenter]
addObserver:self
selector:@selector(appDidEnterPlayGround)
name:UIApplicationDidBecomeActiveNotification
object:nil];
相关文章推荐
- Android开发实践:使用Service还是Thread
- android:descendantFocusability用法简析
- loading 进度条
- Android学习笔记四:socket通信
- Android自定义下拉列表PopupWindow
- Android不安全的权限申请
- android studio遇到的问题(记录总结)
- 无线调试android程序(无需root)
- 【原创】JMeter学习(三十七)Jmeter录制手机app脚本
- <object returned empty description>
- Android Studio 提示 AndroidManifest.xml' specified for property 'manifest' does not exist.
- Android apk压缩技术(一)——巧用shape
- Android 开发有哪些新技术出现?
- Android_开源框架_xutils详解和使用
- Android RecyclerView 使用完全解析
- 微信支付
- iOS隐藏系统时间状态栏
- cocos2dx 帧动画的两种创建方式
- 优化Android Studio/Gradle构建
- 公众号判断用户是否已关注php代码