Proper way to exit iPhone application?

前端 未结 25 3018
难免孤独
难免孤独 2020-11-22 01:54

I am programming an iPhone app, and I need to force it to exit due to certain user actions. After cleaning up memory the app allocated, what\'s the appropriate method to ca

25条回答
  •  没有蜡笔的小新
    2020-11-22 02:39

    The user should decide when an app exits. I don't think it is a good user interaction when an app quits. Therefore there is no nice API for it, only the home button has one.

    If there is an error: Implement it better or Notify the user. If there have to be a restart: Implement it better of Notify the user.

    It sounds dumb, but it's bad practice to exit the app without letting the user decide and not notifying him. And since there is a home button for the user interaction, Apple states, there should not be 2 things for the same function (exiting an app).

提交回复
热议问题