Theme for View Controllers

Good day,

I was thinking to beautify my app by adding some colors to the background, is there a way to set a theme quickly without editing every individual view controllers?

Thank you!
I'm not sure if this would work for your purpose, but if you are using UIKit and not SwiftUI, you should better try modifying appearance proxy.

Appearance Customization

An example:

In AppDelegate

Code Block
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
UIView.appearance().backgroundColor = .red
return true
}


Please remember, this may not work for some kinds of UI components, and some classes have their own appearance objects independently.
Theme for View Controllers
 
 
Q