简体   繁体   中英

Navigation Bar is displaying at the bottom

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
  2. Select your TableViewController and on top click editor->Embed in-> Navigation Controller
  3. Now you should have a navigation bar on top.

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 .

错误的UINavigationBar

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..

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