I have a UITableView inside a UINavigationController . To the right of the UINavigationBar , I have a Edit button. When I click this button, all the text fields in the table cells are activated, so I can edit them. The right button will change to "Save."
I would like the left back button of the UINavigationController be replaced by the Cancel button, which, when I click, does not return me to the previous UIViewController , but simply cancels the editing mode.
When I click "Save", the "Cancel" button should be replaced with the regular UINavigationController button back. Is there an easy way to do this? I tried to access [[self navigationItem] leftBarButtonItem] . This works for the right button, but not for the left.
source share