Posts

Showing posts with the label uinavigationbar

UISearchBar increases navigation bar height in iOS 11

Image
UISearchBar increases navigation bar height in iOS 11 I have my UISearchBar being part of the navigation bar like: UISearchBar let searchBar = UISearchBar() //some more configuration to the search bar ..... navigationItem.titleView = searchBar After updating to iOS 11 something weird happened to the search bar in my app. On iOS 10 and prior I had my navigation bar looking like: iOS 11 iOS 10 Now with iOS 11 I have: iOS 11 As you can see there is difference in the rounding of the two search bars which does not bothers me. The problem is that the search bar increases the height of the navigation bar. So when I go to another controller it looks weird too: In fact that weird black line's height plus the current navigation bar's height is equal to the height of navigation bar shown in the second picture ... Any ideas how to get rid of the black line and having consistent navigation bar height across all view controllers ? Possible duplicate of iOS...