Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

uiviewcontroller title color

Swift 5

let titleAttributes = [
  NSAttributedString.Key.foregroundColor: UIColor.red
]

or 

let textAttributes: [NSAttributedString.Key: Any] = [
  .foregroundColor: UIColor.red
]

let navBar = navigationController?.navigationBar
navBar.titleTextAttributes = titleAttributes
 
PREVIOUS NEXT
Tagged: #uiviewcontroller #title #color
ADD COMMENT
Topic
Name
5+4 =