-6

ホームボタンを使用せずにアプリケーションを終了する必要があります。 exit(0) メソッドへの呼び出しが機能しています。アプリケーションを終了する適切な方法ですか、それとも問題がありますか?アプリケーションを終了する別の方法がある場合は? . 私を助けてください..

4

3 に答える 3

1

any another way to exit application?

キーを追加Application does not run in backgroundし、その値YESをアプリケーションのplistファイルに設定します。ユーザーがホームボタンを押すと、アプリが閉じます。

于 2013-02-27T11:47:31.587 に答える
0
iOS Human Interface Guidelines says Don't Quit Programmatically. we have seen many of apps that had calls to exit(0) previously.
    Apple provided the different stages to exit the app. For that they provided different methods. So by exit() code its not proper to exit the app since the app will get rejected by Apple.
    you can refer this Apple Doc at http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/UEBestPractices/UEBestPractices.html#//apple_ref/doc/uid/TP40006556-CH20-SW27
于 2013-02-27T12:49:51.463 に答える
0

abort();アプリケーションをクラッシュさせる NSException を使用または発生させることができます。

プログラムでアプリケーションを終了することは推奨されません。アプリケーションを終了する必要がある理由を示すアラートをユーザーに表示し、ユーザーがアプリを終了して見えないようにする方法をユーザーに伝える必要があります。アプリにバグがあるように。

于 2013-02-27T11:30:31.490 に答える