I am trying for hours to change the Navigationbar barTintValue in my App. I am using the Master-Detail Template from Xcode using Swift and I read a lots of questions here, but the answer was always to use
navigationController?.navigationBar.barTintColor = UIColor.redColor()
This works fine in AppDelegate, but I want to change the color in each DetailView depending on its content at runtime.
When i put this code into the Master or DetailViewController just nothing happens. I printed out the colors before and after and it does set the values, it just doesn't change. Do I need to update the view or something?
Thanks for you help! Maik