2

I cant change navigation bar frame in ios 11. Here is sample of my code for ios 10:

if let navigationBar = self.navigationController?.navigationBar {
    let frame = CGRect(x: navigationBar.frame.origin.x,
                       y: navigationBar.frame.origin.y,
                       width: navigationBar.frame.width,
                       height: navigationBar.frame.height + 100)
    navigationBar.frame = frame
}

ios 10 and ios 11 screenshots respectively

ios 10 nav bar ios 11 nav bar

jMelvins
  • 194
  • 1
  • 10

1 Answers1

19

Changing the height of the UINavigationBar is no longer directly supported in iOS 11 (see here, here & here).

The best you can hope for is to do something like having a view behind the navigation bar and removing the borders (see here for customisation examples).

Upholder Of Truth
  • 4,643
  • 2
  • 13
  • 23