问题
as you can see from the picture i have added, my navigation bar is displaying at the bottom of the screen under my table view. I have just dragged and dropped my navigation bar on to that view controller which means i'm not using a navigation controller. I don't understand why this is happening and i'm sure its a simple fix which i am missing.
image 2 is the storyboard view
image 3 view of the app running
Any help is much appreciated, Thanks!
回答1:
- Delete your old navigation bar
- Select your TableViewController and on top click editor->Embed in-> Navigation Controller
- Now you should have a navigation bar on top.
回答2:
See screenshot. You dragged a navigation bar into your table. To achieve the behavior you want you can embed your view controller inside a UINavigationController and access your navigation bar via self.navigationController.navigationBar.
回答3:
I got your problem
What you have done is you have taken your navigation bar inside tableview... that is the problem..
you just dragged that navigation bar outside that tableview...and that's it..
来源:https://stackoverflow.com/questions/19158759/navigation-bar-is-displaying-at-the-bottom