I have a project using Storyboards and whenever I push a view controller with a segue, the dynamically created bar button item is always blue.
Swift 5
barButtonItem.setTitleTextAttributes([NSAttributedString.Key.foregroundColor : UIColor.white], for: .normal)