您的位置:首页 > 移动开发 > IOS开发

Ojective C 中编写的ios程序,强制用户在按下home键的时候,退出应用程序

2012-01-04 14:20 465 查看
On iOS 4, multitasking is enabled in Xcode projects by default. This prevents the
applicationWillTerminate
method from being called. If you do not want to support multitasking, place
UIApplicationExitsOnSuspend
in your MyAppName-Info.plist
file and check the checkbox. If you do want to support it, place any code in the
applicationDidEnterBackground
delegate method that you want to execute before the application enters an inactive state.

在IOS4中,Xcode项目的缺省属性是 多任务支持。如果你不想支持多任务,那么就在 MyAppName-Info.plist 文件中放置 Application does not run in background 属性,并且设置成YES。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐