2
votes
  • I create a standard navigation controller
  • I do Editor > "embed in" navigation controller
  • I create segue from mother controller to navigation controller, name it
  • I perform a custom segue:

    performSegueWithIdentifier(CONSTANTS.SegueListMessagesToMessages, sender:view)

Great, it pops up.

However, the child view doesn't have a back button on the navigation controller bar.

I guess I could add a bar button item...but I can't find the Chevron that Apple uses for "Back" in the symbols. Why can't the back button be there automatically?

1
If you embed your controller in a navigation controller it is going to be the root view controller, so there won't be anything to go back to. Don't embed it in a navigation controller and just push it on the current navigation controller if you want there to be back button.dan
@dan , are you suggesting manually drag the navigation bar into the story board? Instead of doing the "embed in"?TIMEX
You don't need to manually add a navigation bar to your view controllers. If you do a push segue from a controller that is already in a navigation controller to a new view controller it will put it in the previous view controller's navigation controller and it will inherit the same navigation bar. Only your root view controller needs to be embedded in a navigation controller.dan

1 Answers

2
votes

Embed the mother controller in the navigation controller then create your segue link. [Navigation Controller] <-(relationship segue)-> [Root View Controller] -(show segue)-> [Child View Controller]