Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Segue back button disappeared in iOS 9

Before iOS 9 was released, I've developed an app targeting iOS 8.4. I've used some UITableView connected each other via segue of kind "Show (e.g. Push)". It worked perfectly with the right behavior: every time I switched from a UITableView to another, the back button appeared, so the user is able to turn back to the previous scene; the back button appeared also from UITableView to UIViewController, using the same kind of segue.

Now I have upgraded to the latest version of Xcode and targeting the app to iOS 9.0, I got this problem: now, if I go from UITableView to another UITableView, the back button doesn't appear anymore, but if I go from UITableView to UIViewController, the back button appears. I've seen other developers has had a similar problem (as you can see here, here and here), but I don't understand how they have solved (except for the third link, but it's not my case). Anyone knows how can I get back button working again? Thanks in advance

enter image description here

like image 466
Kurtis92 Avatar asked Nov 02 '15 11:11

Kurtis92


2 Answers

It looks like the guy who posted the second link is having the same problem as you. In a comment he said that the way he fixed it was getting rid of the extra navigation controllers:

No need put the navigation controller for each view. put the navigation controller start view only.

So that is what I would suggest doing. Only put a navigation controller on the first view controller. Get rid of all the others.

like image 101
Caleb Kleveter Avatar answered Oct 30 '22 21:10

Caleb Kleveter


So, thanks to Caleb's and ogres' suggestions, I solved my problem in this way as you can see in this screenshot, I hope it helps anyone who will have the same problem!

enter image description here

If you have two UITableViews and you want connect them to each other, you just need one NavigationController.

like image 29
Kurtis92 Avatar answered Oct 30 '22 21:10

Kurtis92