J.M
J.M

Reputation: 15

How to show a view controller using a navigation controller segue, including back segue (Swift)

I have to view controller, One has a button and the other is embed in a navigation controller. I Don't know how to make a proper segue to that second view controller including a back (unwind) segue. That is in swift.

Upvotes: 0

Views: 422

Answers (1)

Avinash12388
Avinash12388

Reputation: 1102

You're going to use a navigation controller. Go and select your view in the storyboard, and select Editor -> Embed In -> Navigation Controller. Do the same for the second view. Now, add a button in the first view that connect to the second view on a click. Make sure when you drag and drop that it's a push segue.

enter image description here Voila! You should now have your navigation controller working.

Upvotes: 0

Related Questions