I inserted an NSLog and a UIAlertView into this function call. Whe开发者_高级运维n I pressed the home button, the NSLog executed, but not the UIAlertView. Why is that?
Try doing it in applicationWillResignActive
(not tested). It gets called before applicationDidEnterBackground
. But I think you should rethink throwing up an alert box for the 5 secs before iOS kills it.
精彩评论