1

I am working of changing theme feature and I need to reload all colors in my app.

My app have tabbar.

So, in my first step I reload all colors which I change with appearance (UINavigationBar, UITabBar, etc) by calling method in which I set their colors.

The next my step is reload all 4 tabs and all opened VCs under them. Here I use code:

 let windows = UIApplication.sharedApplication().windows
                for window in windows {
                    for view in window.subviews {
                        view.removeFromSuperview()
                        window.addSubview(view)
                    }
                }

And it works for all tabs rather them current (navigation VC, root VC and other pushed VC). How can I reload them?

Phyber
  • 1,368
  • 11
  • 25
sffsf
  • 55
  • 5

1 Answers1

0

You can manage theme color by, UIAppearance as you mentioned in question,tintcolor for button and other views.

You can refer Raywenderlich's tutorial and you can refer My answer from these post for different trick to manage theme for whole app. And you can refer accepted answer of that same post that states same thing that i have mentioned above (i.e. tintcolor and appearance).

Community
  • 1
  • 1
Ketan Parmar
  • 27,092
  • 9
  • 50
  • 75