Reputation: 194
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
Upvotes: 2
Views: 10154
Reputation: 4711
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).
Upvotes: 19