Is there a way to show a UIAlertView if my app terminates due to lack of memory? I believe that it is better than just terminating the app without any message - the user should realize that this is a transient memory problem and not a bug in the app.
I have an app 开发者_JAVA技巧on my iphone that shows such an alert and then terminates (I hope that it's not the way this app handles all memory warnings :-) )
Yes, its possible ! you need to first track uncaught exceptions & then you can display a alert,i m not sure you understand if i explain the concept, so try with this link
http://cocoawithlove.com/2010/05/handling-unhandled-exceptions-and.html
run the project in the link at bottom of page, here u will the solution,
The Gd thing is if any error caused in any part of app it will trace & alert & you , simply you need make allocations in your app appdelegate class.
we use these concepts to warn user's if any app dies with low memory & will have option to ask user to sent report to us , thereby helpful to track what caused it & all!
hope this helps!
精彩评论