IOS applicationDidEnterBackground
来源:互联网 发布:递归算法的应用 编辑:程序博客网 时间:2024/05/21 17:45
如果我们想在程序进入后台后处理点事情,我们该怎么做呢?
- (void)applicationDidEnterBackground:(UIApplication *)application
{
//阻塞主线程
dispatch_sync(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
for(int i=0;i<10000;i++)
{
NSLog(@"i->> %d",i);
}
//在这里你处理一些事情
});
}
- IOS applicationDidEnterBackground
- iOS
- iOS
- IOS
- iOS
- iOS
- IOS
- ios
- iOS
- iOS
- IOS
- iOS
- ios
- ios ~~~~~
- ios
- IOS
- IOS
- IOS
- android: Serializable 和 Parcelable
- php安装报错 ‘gdIOCtx’ 没有名为 ‘data’ 的成员
- 词性标注类函数
- unionfs安装到Linux内核
- 为什么程序员喜欢在深夜编程?
- IOS applicationDidEnterBackground
- eclipse+jbpm5+jboss的集成配置
- DundasWebChart在IIS7.5 windows2008 64位版发布时不能正常显示
- valgrind显示“x blocks are still reachable in loss record x of x”
- 利用脚本解放自己,让脚本帮我做事2 -- 帮自己寻找不在SVN控制中的文件
- give two sorted array, find the k-th smallest element of union of A and B
- 求一个学院教材管理系统
- WEB压力测试
- OCX--VC2005开发OCX