1
votes

I have subclassed UINavigationBar and customised the height of navigation-bar. Now it has 108pt height. But in all the screens, I am having the top area of tableview/scrollview behind the custom navigation-bar. I have tried extend edges under top bar, but it only move 64pt.

Is there any way to move all the contents below the custom navigation bar, without modifying top constraint or setting content insets of every screen?

2

2 Answers

1
votes

Did you try -

automaticallyadjustsscrollviewinsets = false

This can be done from storyboard as well as from code.

Also, try setting your navigation bar to opaque.

Hope this helps.

0
votes

First of all i would avoid to change the height of the apple navigationBar. This can cause some more problems. As you can see.

Anyway you could change the contentInset of the tableView.

tableView.contentInset = UIEdgeInsets(top: HEIGHTOFNAVIGATIONBAR - ADDEDHEIGHT, left: 0, bottom: 0, right: 0)