In a navigation controller, you automatically get the correct colour and position of a navigation bar as expected.
like this
I created a Navigation Controller, deleted the "Root View Controller" that appeared with it. Then hold ctrl and drag the "Navigation Controller" on your View (delete the navigation bar you added manually before). Set the Navigation Controller as "Initial View Controller" and it works fine for me now.
The best way to overcome this in iOS 7 is by conforming to the new UIBarPositioningDelegate
protocol.
You connect the delegate of your NavigationBar to your view controller (set your view controller as the delegate for the navigation bar either through storyboard or through code) and conform to that protocol and by implementing the method
-(UIBarPosition)positionForBar:(id<UIBarPositioning>)bar { return UIBarPositionTopAttached; }
You can remove the top gap in the view controller. You need to place the bar 20 points below the top edge