TimSim
TimSim

Reputation: 4036

How to dynamically change navigation bar color on ios15?

What worked for years was

self.navigationController?.navigationBar.barTintColor = MY_COLOR

but in iOS15 this is not working. There's answers for how to change it on app start, but I need to change it after the nav bar's been shown and without reloading the view controller. This is possible in iOS 14 and older.

Upvotes: 2

Views: 1254

Answers (1)

C0L.PAN1C
C0L.PAN1C

Reputation: 12243

In your VC you can try adjusting the view.backgroundColor

      UINavigationBar?.view.backgroundColor = MY_COLOR

Upvotes: 2

Related Questions