Back button method affecting uinavigationbar (iOS)

I have a table view that is pushed to the detail view controller. From the detail view controller, when I press the “back” button, I want an integer value to change. How to Edit the action of the navigation bar back button programmatically. The back button is automatically placed in my application because I am using a table view, so I didn’t actually create a button, so I don’t know how to affect it. < p>

To be clear, I still want the back button to return to the original view, but at the same time change the value of the integer. Thank you!

Thanks PengOne for pointing me in the direction.
Add UINavigationBarDelegate in the header file and add it in the .m Use it in the file:

- (BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item
{
/ /insert your back button handling logic here
// let the pop happen
return YES;
}

I have a table view , Push to the detail view controller. From the detail view controller, when I press the “back” button, I want an integer value to change. How to programmatically edit the operation of the navigation bar back button. The back button will automatically be put In my application, because I’m using a table view, I don’t actually create a button, so I don’t know how to influence it.

To be clear, I still want to go back The button returns to the original view, but at the same time changes the value of the integer. Thank you!

Thanks to PengOne for pointing me in the direction.
Add UINavigationBarDelegate in the header file and use it in the .m file:

- (BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item
{
//insert your back button handling logic here
// let the pop happen
return YES;
}

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3946 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.