简体   繁体   中英

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.

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.

在此处输入图片说明 Voila! You should now have your navigation controller working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM