开发者

viewWillDisappear firing before UIApplicationWillTerminateNotification

If I add an observer for UIApplicationWillTerminateNotification in a UIViewController, it fires after viewWillDisappear.

I have some code in the viewWillDisappear that needs to take a different action based on weather or not the application has been terminated or simply unloaded.

Can anyone suggest what开发者_C百科 could be done in this situation ?

TIA!


A crude hack, but you could add a boolean ivar which you set in applicationWillTerminate and then check it in viewWillDisappear

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜