i\'ve been trying to remove the navigationBars border without luck. I\'ve researched and people seem to tell to set shadowImage and BackgroundImage to nil, but this does not
This is the way if you want to do it without changing the background color:
// Remove the border ImageView from the NavigationBar background
func hideBottomBorder() {
for view in navigationBar.subviews.filter({ NSStringFromClass($0.dynamicType) == "_UINavigationBarBackground" }) as [UIView] {
if let imageView = view.subviews.filter({ $0 is UIImageView }).first as? UIImageView {
imageView.removeFromSuperview()
}
}
}
NOTE: This might crash on a production app. Apparently the NavigationBar doesn't like its view disappearing