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?