Maintaining a colour theme manager on iOS swift

Usage:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {// Override point for customization after application launch.ThemeManager.applyTheme(theme: .theme1)return true}
import UIKitclass ViewController: UIViewController {let theme = ThemeManager.currentTheme()override func viewDidLoad() {super.viewDidLoad()self.view.backgroundColor = theme.backgroundColor}}

If you enjoyed reading this post, please share and recommend it so others can find it 💚💚💚💚💚💚 !!!!

--

--

--

iOS and tvOS developer, dreamer, photographer 🤨

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhimuralidharan

Abhimuralidharan

iOS and tvOS developer, dreamer, photographer 🤨

More from Medium

Closures in swift

Some Notes when Upgrading into Xcode 13

You can get that easily by using single variable and make it public.

How to create an Xcode project and connect it to Github?