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

来源:互联网 发布:下载学英语软件 编辑:程序博客网 时间:2024/04/28 04:47

On iOS 4, multitasking is enabled in Xcode projects by default. This prevents theapplicationWillTerminate method from being called. If you do not want to support multitasking, placeUIApplicationExitsOnSuspend in your MyAppName-Info.plist file and check the checkbox. If you do want to support it, place any code in theapplicationDidEnterBackground 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。




原创粉丝点击