Friday, July 10, 2015

Change the Global Tint in an Xcode Storyboard

TL;DR Look at the File Inspector tab (the one with the blank document) of your storyboard

Whenever I go looking for the Global Tint defined in the main storyboard in Xcode, there’s always a moment of cognitive dissonance.

My problem is that I go looking for some kind of Window object, which of course is how you’d do it programmatically (in Swift):

UIApplication.sharedApplication().delegate?.window!!.tintColor = UIColor.redColor()

The double !! after window is not a typo according to Xcode, though it sure looks weird.

Anyway, I guess nobody wants to make UIWindows things in Storyboards, so this property is stashed under the File Inspector tab!