5

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

Community
  • 1
  • 1
Kurtis92
  • 710
  • 1
  • 12
  • 34
  • can you provide screenshots ? are you changing anything in NavigationBarItem ? – ogres Nov 02 '15 at 11:19
  • you can embed the parent view controller in Navigation controller – engmahsa Nov 02 '15 at 11:25
  • @ogres I've edited my post, you can see a screenshot of my storyboard. The only change in NavigationBarItem is the title of the NavigationBar and the title of the back button – Kurtis92 Nov 02 '15 at 14:01
  • @engmahsa I don't understand, can you provide me an example or explanation? – Kurtis92 Nov 02 '15 at 14:02
  • 1
    try directly opening Menu Locale NC-s rootViewcontroller and not the Navigationcontroller, because when you are pushing navigation onto navigation maybe its confusing? – ogres Nov 02 '15 at 14:07
  • Got it, I wonder why Apple guys didn't decided to keep it working anyway for the older apps. By the way, thank you! – Kurtis92 Nov 02 '15 at 14:48

2 Answers2

4

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.

Caleb Kleveter
  • 11,170
  • 8
  • 62
  • 92
  • Yes, right, I had read the solution of the second link, but I didn't understand how to do it. So, thank you, but special thanks to @ogres too! – Kurtis92 Nov 02 '15 at 14:45
2

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.

Caleb Kleveter
  • 11,170
  • 8
  • 62
  • 92
Kurtis92
  • 710
  • 1
  • 12
  • 34