How to set action to the backButtonItem on the navigation bar?
问题 How to set action to the backButtonItem on the navigation bar? I have a navigation bar, when I'm pressing the back button, I need to alert some message to the user, and only after user's reaction - return to the previous view. How can I do it? Thanx! - (void)viewDidLoad { [super viewDidLoad]; //no one field don't changed yet isDirty = FALSE; //edited user //set default values newData = [data copy]; //setting navigation controller rigth button UIBarButtonItem *rightButton = [[UIBarButtonItem