This is not a problem. I just want to know if there is a way to change the font color and font size of a navigation bar item programmatically and not through the storyboard. I have a navigation controller setup in the storyboard like so:
I need to change the color and font size of the label "Flash Chat"
Each of the view controller is linked to a swift file of same name.
2
Answers
If your
ViewController
is attached toNavigationController
, then you can use thisUse below code to set title attributes in
viewDidLoad()
.