Created
October 6, 2019 15:31
-
-
Save sgl0v/7c26480df00fe0bcea089342b00b1c16 to your computer and use it in GitHub Desktop.
Backward compatible Dark Mode on iOS - Theme_iOS13.swift
This file contains hidden or 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
| struct Theme { | |
| static let light = Theme(type: .light, colors: .light) | |
| static let dark = Theme(type: .dark, colors: .dark) | |
| @available(iOS 13.0, *) | |
| static let adaptive = Theme(type: .adaptive, colors: .adaptive) | |
| enum `Type` { | |
| case light | |
| case dark | |
| @available(iOS 13.0, *) | |
| case adaptive | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment