Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let myDynamicColor = UIColor { (traitCollection: UITraitCollection) -> UIColor in
- switch traitCollection.userInterfaceStyle {
- case .unspecified, .light: return UIColor(red: 220, green: 220, blue: 220, alpha: 1.0)
- case .dark: return UIColor(red: 0, green: 0, blue: 0, alpha: 1.0)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement