In a navigation controller, you automatically get the correct colour and position of a navigation bar as expected.
like this
I turned "Use Autolayout" off and it worked for me.