If you just want to use a solid navigation bar color and have set this up in your storyboard, use this code in your
AppDelegate
class to remove the 1 pixel border via the appearance proxy:
Objective-C
[[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init]
forBarPosition:UIBarPositionAny
barMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
Swift 3.x
UINavigationBar.appearance().shadowImage = UIImage()
UINavigationBar.appearance().setBackgroundImage(UIImage(), for: .default)
NOTE: must set isTransluscent
UINavigationBar instance to false
to avoid transparent navigation bar; either in storyboard or in code
navigationController?.navigationBar.isTranslucent = false
// or
navigationBar.isTranslucent = false
@Gerst20051 here it is in Swift: