Maintaining a colour theme manager on iOS swift

Abhimuralidharan
May 8, 2017 · 2 min read

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 💚💚💚💚💚💚 !!!!

Abhimuralidharan

Written by

iOS and tvOS developer, dreamer, photographer 🤨

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade