How do I programmatically quit my iOS application?
来源:互联网 发布:家庭网络布线工 编辑:程序博客网 时间:2024/06/05 23:54
[https://developer.apple.com/library/content/qa/qa1561/_index.html]
How do I programmatically quit my iOS application?
Q: How do I programmatically quit my iOS application?
A: There is no API provided for gracefully terminating an iOS application.
In iOS, the user presses the Home button to close applications. Should your application have conditions in which it cannot provide its intended function, the recommended approach is to display an alert for the user that indicates the nature of the problem and possible actions the user could take — turning on WiFi, enabling Location Services, etc. Allow the user to terminate the application at their own discretion.
Warning: Do not call the exit
function. Applications calling exit
will appear to the user to have crashed, rather than performing a graceful termination and animating back to the Home screen.
Additionally, data may not be saved, because -applicationWillTerminate:
and similar UIApplicationDelegate
methods will not be invoked if you call exit
.
If during development or testing it is necessary to terminate your application, the abort
function, or assert
macro is recommended.
- How do I programmatically quit my iOS application?
- How do I integrate my application with CXF
- How do I use the DCMTK libraries in my own application?
- How do I use locales and resource bundles to internationalize my application?
- How do I create my own DTD?
- How do I pause my game?
- How I do my computing -- stallman
- How do I erase my disk
- How do I pause my game?
- How do I backup my Raspberry Pi?
- How do I reboot my AIX server?
- How do i prevent end users from connecting to the database other than my application?", version 8.1.5
- How do I make my ASP pages more efficient?
- LINUX COMMANDS--How Do I Change my Linux Password?
- How do I resolve my problem with appcompat.txt?
- How do I create a log file of my installation?
- How do I configure my DNS settings in Ubuntu server?
- How do I fix Passenger application startup problem
- [学习笔记06]string总结
- 如何删除GitHub上资源库中的项目
- 保存Hive查询的方法
- c之柔性数组成员
- ZOJ1032-Area 2(已知点坐标求多边形面积,求线段上的整点数量,pick定理)
- How do I programmatically quit my iOS application?
- matlab 使用三个矩阵画三维图像
- C++中的类继承(4)继承种类之单继承&多继承&菱形继承
- STL库之优先队列(例hdu1873)
- isNAN空字符串返回false
- css设置居中的常见情况
- Python学习6-高级特性
- Codeforces 505A Mr. Kitayuta's Gift 题解
- Windows10 creators update comeing