I am building a Swift app and I am trying to change the color of the navigation bar.
I’m trying to do it directly from Xcode without code on the main.storyboard.
I’ve tried changing several settings in the Xcode Attribute Inspector but nothing has worked. I’ve also searched StackOverFlow but all the answers I find are are changing it programatically.
Does anyone know how to change the color of it directly from the Attribute Inspector?
Thanks.
5
Answers
Try it:
You can use
or you do this by Storyboard Like this.
In the storyboard, change the background color. It will work.
You just need to click on the navbar and in attribute inspector, there is an option for Background, you can provide any color which you want to give. In my case, I selected a custom sky blue color.
💡 Navigation Bar:
Replace greenColor with whatever UIColor you want
💡 Navigation Bar Text:
Replace orangeColor with whatever color you like.
💡 Tab Bar:
💡 Tab Bar Text:
On the last two, replace brownColor and yellowColor with the color of your choice.
💡swift navigation bar title color:
Place this in your didFinishLaunchingWithOptions method in the AppDelegate.