Last active
July 8, 2020 05:53
-
-
Save georrgee/dd6b81f5c39602b6c2d8e3a52ec9df41 to your computer and use it in GitHub Desktop.
For Dark Mode Medium Article
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
// ViewController.swift | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
//view.backgroundColor = .systemRed | |
view.backgroundColor = CustomColor.customBackgroundColor | |
} | |
} | |
// ---------------------------------------------------------------- | |
// Constants.swift | |
enum CustomColor { | |
static let customBackgroundColor = UIColor(named: "BackgroundColor") | |
static let customButtonColor = UIColor(named: "ButtonBackgroundColor") | |
static let customLabelColor = UIColor(named: "LabelColor") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment