• Home
  • About
  • Our Apps
  • Learn
  • Contact
Login

Register

Login
Seemu Apps Seemu Apps
  • Home
  • About
  • Our Apps
  • Learn
  • Contact

Tutorial – Set Navigation Bar Text Color

Home ios Tutorial – Set Navigation Bar Text Color

Tutorial – Set Navigation Bar Text Color

Mar 23, 2016 | Posted by Andrew | ios, swift, tutorial, xcode |

You can simply set the Navigation Bar text (tint) Color in XCode using one line of code. This is for the back button and any buttons with text on the left/right side.

I have setup a XCode project with a simple navigation controller as the root view controller of the default view. With an extra view added, with a segue to open it. It looks like:

Screen Shot 2016-03-03 at 5.47.58 pm

 

To set the navigation bar item and back color tint/text color simply add the following line of code in viewDidLoad()

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        self.navigationController?.navigationBar.barTintColor = UIColor.red 
      }

If you run the app you will now see the Navigation Bar item text has is red:

Screen Shot 2016-03-03 at 5.54.14 pm

Screen Shot 2016-03-03 at 5.54.21 pm

DownloadSourceCode

Tags: bar textnavigation bartext colortinttint color
1
Share

About Andrew

Andrew is a 24 year old from Sydney. He loves developing iOS apps and has done so for two years.

You also might be interested in

Tutorial – Custom Navigation Bar Back Arrow

Mar 23, 2016

You can simply set the Navigation Bar back image style with[...]

Tutorial – Set Navigation Bar Color

Mar 3, 2016

You can simply set the Navigation Bar Color in XCode[...]

Tutorial – Transparent UI Navigation Bar

Feb 21, 2016

Making the UINavigation bar transparent & see through is easy[...]

Welcome

Hi I am Andrew and welcome to Seemu Apps! Have a look around, we provide tutorials for primarily iOS apps.
Bluehost website hosting discount

Seemu’s Studio Setup

Blue Yeti Microphone
Rode Stand
Spider Shock Mount
Mac Keyboard Cover
Screenflow - recording software

Contact Us

We're currently offline. Send us an email and we'll get back to you, asap.

Send Message

Footer

:)

© 2025 · Your Website. Theme by HB-Themes.

  • Home
  • About
  • Our Apps
  • Learn
  • Contact
Prev Next