dmram
dmram

Reputation: 145

How to make a view on a TableView controller cover the navigation bar?

I have a view in a view controller with a custom background, and a navbar that is clear. the problem is that when I add the navbar to this table view controller, the view doesn't cover the back nav bar, so the nav bar looks black. How can I make the view to cover also the nav bar?

This is what happens In the table view controller, as you can see the view ends when the nav bar starts This is what happens In the table view controller, as you can see the view ends where the nav bar starts

And this is how I want the nav bar to look like; this doesn't happen when a view controller is embeded in the nav bar, it only happens in a table view controller And this is what I want to happen, this dosn't happen when a view controller is embeded in the nav bar, it only happens in the table view controller

Upvotes: 0

Views: 600

Answers (1)

Tob
Tob

Reputation: 1025

The problem is that your view's top constraint is pinned to the nav bar rather than the top of the view. Just change the top of the table view to be pinned to the top of the screen instead of the bottom of the nav bar.

Upvotes: 1

Related Questions