I want to Show UIAlertView asking “Save” or “Don’t save” on Back Click to previous view in navigation based iPhone Application.
Should I write it on, ViewWillDisappear of current View ? Is that proper ?
Or any other way ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First of blindly showing the
UIAlertViewfor saving. I suggest have aBOOLflag in your code by defaultFALSEwhich means data not saved. If the user saved his data then make this flagTRUE. So when the view is about topopViewControllerthen check this flag. IfFALSEonly then show thealertView.If I am not wrong, generally when you are about to
popa viewController, you link it to some button right? in thatIBActionmethod put this check.