Ios – Swift – UITableViewController with navigation bar

iosswiftxcode

I am facing an issue with one of my table view controllers. I don't seem to be able to get the navigation bar to show on top no matter what option I enable (maybe I am missing something).

I tried the following:

  • Selecting the controller in storyboard and going to attributes inspector and ensuring that top bar is set to Translucent Navigation (didn't work)
  • In the viewWillAppear function, I wrote: (didn't work)

self.navigationController?.navigationBarHidden = false

Attached is also an image of the controller discussed. How can I do show the top bar? otherwise the results are ugly since the records showing (rows) are starting from the very top. I do not wish to use UIEdgeInsetsMake to fix it if possible.

enter image description here

and

enter image description here
Thanks,

enter image description here

Best Answer

Click the ordersViewController. Then in the top bar Editor > Embed In > Navigation Controller and remove the navigationbar you currently have in the VC.