applicationWillTerminate: not being called

前端 未结 4 1535
猫巷女王i
猫巷女王i 2020-12-03 23:26

I\'m using applicationWillTerminate: to save some last-minute stuff. But the problem is that it never gets called. If I do something like this at the top of the

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-03 23:45

    From the iOS Application Programming Guide on Core Application Design and Application life time:

    The applicationWillTerminate: method is not called if your application is currently suspended.

    If you are linking against iOS 4.0, you should also save data in applicationDidEnterBackground:.

提交回复
热议问题