Hiding UIAlertView Opened in Another Function (iPhone SDK)
I am using the solution posted in this thread:
how to show a alert when user click on use button after shooting a picture using uiimagepicker?
However, that gave an error on the following line that "saveImage" was undeclared.
saveImage = [[UIAlertView alloc] initWithTitle:@"Sa...
So I changed the code to read:
UIAlertView *saveImage = [[UIAlertView alloc] initWithTitle:@"Sa...
and the error went away, and the alert displays great.
The problem is that when I try to dismiss the alert below in didFinishSavingWithError it gives the same error from above that "saveImage" is undeclared (first use in function).
开发者_如何学PythonI've only been playing around with iPhone development for a few days, so please forgive me if this a a simple/stupid question, but ...
How do I reference that alert inside of didFinishSavingWithError to close it?
Move the UIAlertView *saveImage; to the top of the .m file (outside the method) and in your method where you want to pop the Alert go back to your saveImage = [[UIAlertView alloc] initWithTitle:@"Sa...
精彩评论