UIApplication *app = [UIApplication sharedApplication];
[app performSelector:@selector(suspend)];
//wait 2 seconds while app is going background
[NSThread sleepForTimeInterval:2.0];
//exit app when app is in background
NSLog(@"exit(0)");
exit();
相关文章
- iOS NSString追加字符串的方法
- 如何获取app的activity
- IOS成长之路-Nsstring搜索方法rangeOfString
- 使用iOS原生sqlite3框架对sqlite数据库进行操作
- IOS_修改项目模板
- iOS如何实时查看App运行日志
- active developer path ("/Applications/Xcode.app/Contents/Developer")
- xcrun: error: active developer path (/Users/XJW/Desktop/Xcode.app/Contents/Developer) does not exist, use `xcode-select --switch path/to/Xcode.app` to
- xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer)解决办法
- iOS开发之--png图片编译时报错 (Command /Applications/Xcode.app/Contents/Developer/usr/bin/copypng failed with exit code 1 )