I have a UITableViewController that uses didSelectRowAtIndexPath: to init a view controller with initWithNibName:. The user is able to return to the table view but I would like to perform a if/else and display an alert view to confirm if the user would like to return to the table view. I have no clues where to start.
In short, I would like to customize the back button.
Can’t you create a
UIBarButtonIteminstance and assign it to the view controller’s navigation item? Something like this,and then in
backButtonPressed:, trigger an alert view.Based on the user choice, you can pop the view controller or not.