我想在互联网连接不可用时关闭我的应用。
我检查过了,但我如何创建提醒,然后关闭我的应用程序?
最佳答案
您不应该强行关闭应用程序,因为终止应用程序的标准方法是按下主页按钮(或使用多任务栏)
Don’t Quit Programmatically
Never quit an iOS application programmatically because people tend to interpret this as a crash. However, if external circumstances prevent your application from functioning as intended, you need to tell your users about the situation and explain what they can do about it. Depending on how severe the application malfunction is, you have two choices.
Display an attractive screen that describes the problem and suggests a correction. A screen provides feedback that reassures users that there’s nothing wrong with your application. It puts users in control, letting them decide whether they want to take corrective action and continue using your application or press the Home button and open a different application
If only some of your application's features are not working, display either a screen or an alert when people activate the feature. Display the alert only when people try to access the feature that isn’t functioning.
关于ios - 互联网不可用时关闭应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8003519/