Problem with applicationShouldTerminate on iPhone

后端 未结 4 1380
再見小時候
再見小時候 2021-01-24 05:57

I\'m having a problem with applicationShouldTerminate.

What ever I do it seams that has no effect. Any help would be appreciated.

I\'m well versed in programing

4条回答
  •  长情又很酷
    2021-01-24 06:27

    1. applicationShouldTerminate and NSApplication do not exist on the iPhone. You have to use UIApplication.

    2. The alert view is never shown because the 'show' method does not block, and therefore, the end of 'applicationWillTerminate' is reached immediately after you create the alert view and try to show it. I believe this is by design. You can't really begin asynchronous operations in 'applicationWillTerminate'.

提交回复
热议问题