How do you alert the user that you are about to exit the app? I've been struggling with this for some time... When I am many levels deep in the code and get an unrecoverable error, (file system problem, database problem) I want to alert the user using UIAlert , then exit. The problem is that UIAlert only displays at the beginning of the next run cycle, so in order to get there , I need to cleanly return from many levels deep in the code. I don't want to do that...
I tried using [self.view presentError], which will go up the chain to the top of the app , then show an alert, however I don't think its supported on the iPhone because I couldn't get it compiled.
Any suggestions? Is there something like CFRunLoopStop that won't STOP the run loop, it will just go to the top of it? Is there something that will return,return,return,return up through my methods till I get to the top of the run loop so the alert will show? Or do I have to return all the way up the chain when I find an error?
Thanks!
I tried using [self.view presentError], which will go up the chain to the top of the app , then show an alert, however I don't think its supported on the iPhone because I couldn't get it compiled.
Any suggestions? Is there something like CFRunLoopStop that won't STOP the run loop, it will just go to the top of it? Is there something that will return,return,return,return up through my methods till I get to the top of the run loop so the alert will show? Or do I have to return all the way up the chain when I find an error?
Thanks!