I have a Navigation Controller and when I press the back button I don’t want to pop the view but I want to show an UIAlertView.I just want to pop the view after having make a choice on the UIAlertView!
How can I do?
I tried to catch the event ‘back button pressed’ but with no results 🙁
I have a Navigation Controller and when I press the back button I don’t
Share
Create a UIBarButtonItem inside viewDidload and added it to the navigation bar
create a method which will be called when the backButton is clicked
write this UIAlertView delegate method which will be called when the button in the UIAlertView is clicked
NOTE: Dont forget to add UIAlertView delegate in the header file
<UIAlertViewDelegate>