简体   繁体   English

如何在后台进入时关闭iPhone应用程序?

[英]How to turn Off iPhone application when enters in background?

I have made an iPhone application. 我制作了一个iPhone应用程序。 When my application enters in background. 当我的应用程序进入后台时。 I want to turn off fully my iPhone application,and when i again start my iPhone application it should starts from the starting page,it should not start from where i left. 我想完全关闭我的iPhone应用程序,当我再次启动我的iPhone应用程序时,它应该从起始页面开始,它不应该从我离开的地方开始。 I have used exit(0),but i think it is not recommended by Apple. 我使用了退出(0),但我认为它不是Apple推荐的。 Please provide some suitable solution soon. 请尽快提供一些合适的解决方案

You can achieve it by modifying your info.plist file. 您可以通过修改info.plist文件来实现它。

add this Key "Application does not run in background" and set its value to "YES" 添加此密钥“应用程序不在后台运行”并将其值设置为“YES”

This should get you going! 这应该让你去!

Let me know if it solves:) 如果它解决了,请告诉我:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当应用程序进入后台时,popToRootViewController - popToRootViewController when application enters background 当应用程序使用AVAudioPlayer进入后台时如何播放音频 - How to play audio when Application enters in to the background using AVAudioPlayer 从应用程序打开/关闭iphone的Wifi - Turn Wifi on/off for iphone from an application 当应用程序进入后台时,关闭modalviewcontroller - dismiss a modalviewcontroller when the application enters background iPhone进入飞行模式时如何通知? - How to be notified when iPhone enters airplane mode? iPhone:为什么当应用程序进入后台时,applicationMusicPlayer为什么会退出播放? - iPhone: Why does applicationMusicPlayer quit playing when app enters background? 如何打开/关闭 swift 2 的 iPhone 相机闪光灯? - How to turn the iPhone camera flash on/off swift 2? 如何关闭 MPMoviePlayerController iPhone 中的音频 - How to turn off audio in MPMoviePlayerController iPhone 如何打开/关闭 iPhone 摄像头 flash? - How to turn the iPhone camera flash on/off? 在多任务iPhone应用程序的后台运行NSTimer以打开/关闭定位服务 - running an NSTimer in the background of a multitasking iPhone app to turn location service on/off
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM