简体   繁体   中英

Load Navigation Bar in Swift with .xib file

I am learning to program in Swift 4, and I have no problems with the code, but I am working on a project using MVC with XIB design files. A NavigationBar is added to a view, but it does not load the back button to the left of the title.

This is what I want:

预期结果

Currently, I only have this:

故事板

I have not seen your code but it seems you do not have navigation controller.

Add a navigation controller on your storyboard and connect your view controller to it (use segue).

You can use this to learn more about navigation controller: https://developer.apple.com/documentation/uikit/uinavigationcontroller

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