Wrong order in navigation bar and table view

2019-09-16 14:39发布

问题:

from a Home VC, embedded in a storyboard: I tap on the left button, performing a segue. This segue will lead me to a navigation controller with its own tableview (the one that comes with the object). I simply want a black navigation bar, but it seems that navigation bar is before the view and the view, i before the tableView.

in storyboard I set: the navigation bar to "opaque black navigation bar" in table view's attributes inspector I set view's background to red (is a test)

check the last image for update

my storyboard:

the problem in the storyboard:

but what I obtain is a sort of sovrapposition, like this.

UPADATE (new problem navigation bar black, status bar transparent, and can't hide it from storyboard):

回答1:

Set navigationController.navigationBar.translucent = NO;



回答2:

In the storyboard for the viewController check if the "Adjust Scroll View Insets" property is checked unser "View Contoller" layout