How to remove UINavigationBar's bottom border / shadow in iOS 7
One of the most annoying visual things Apple introduced in iOS 7 is inability to remove the navigation bar shadow image. iOS 7 UI is perfect to create seamless transition between the content and the top of the screen.
The only issue is that darn line at the bottom. There is no property on UINavigationBar to hide it. There is shadowImage which allows you to change it, but can’t remove it – shadowImage = nil is the default which shows their default image. Even changing the shadowImage to 100% transparent image is not enough:
For a custom shadow image to be shown, a custom background image must also be set with the setBackgroundImage:forBarMetrics: method. If the default background image is used, then the default shadow image will be used regardless of the value of this property.
Brilliant. 😕 You can remove the shadow only if you also kill the blur, like this:
Can’t help to think this was not properly thought through, but given the hectic schedule Apple engineers had for iOS 7, something had to give.
Anw, with no other avenue left, it’s subview walkthrough time.