Skip to content

Instantly share code, notes, and snippets.

@serhiybutz
Last active July 13, 2020 03:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save serhiybutz/956c8362d4688160054174d02fe9a1ec to your computer and use it in GitHub Desktop.
Save serhiybutz/956c8362d4688160054174d02fe9a1ec to your computer and use it in GitHub Desktop.
extension Themer where Theme == MyTheme {
    private static var instance: Themer?
    static var shared: Themer {
        if instance == nil {
            instance = Themer(defaultTheme: .light)
        }
        return instance!
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment