I have a navigation bar which includes a UISearchController
, and I cannot find a way to get rid of the 1px bottom border below the navigation bar:
I am already using the tricks for removing the navigation bar bottom border as suggested in this answer and many others:
navigationBar.isTranslucent = false
navigationBar.setBackgroundImage(aTransparentImage, for: .default)
navigationBar.shadowImage = nil
If I don't set the searchController
on the navigationItem
of my view controller it's fine, there is no bottom border, but as soon as I set the searchController
it appears.
Even the dirty hacks that look for a 1px UIImageView
in the nav bar view hierarchy don't work, as it seems this view is in a separate tree of the hierarchy. It's the UIImageView
highlighted in blue below:
I'm out of ideas