In my UINavigationController I push three of UITableViewController. In my second UITableViewController I set in viewDidLoad
:
self.navigationItem.title = "controller2"
self.navigationItem.backBarButtonItem?.title = "c2"
Then I do the following. Starting at UITableViewController one push UITableViewController two and push UITableViewController three on the UINavigationController. When I reach UITableViewController three the back button displays controller2
instead of c2
.
I did the same setup on the first UITableViewController and when I reach UITableViewController two the back button shows the correct title.
Why does the back button shows the wrong title?