Navigation Bar is displaying at the bottom

随声附和 提交于 2020-01-24 07:29:04

问题


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:


  1. Delete your old navigation bar
  2. Select your TableViewController and on top click editor->Embed in-> Navigation Controller
  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!