{"id":2171,"url":"https://github.com/wxxsw/SwiftTheme","last_synced_at":"2025-08-06T14:31:25.446Z","repository":{"id":41384224,"uuid":"53918172","full_name":"wxxsw/SwiftTheme","owner":"wxxsw","description":"🎨 Powerful theme/skin manager for iOS 9+ 主题/换肤, 暗色模式","archived":false,"fork":false,"pushed_at":"2022-12-16T03:44:13.000Z","size":2693,"stargazers_count":2524,"open_issues_count":14,"forks_count":305,"subscribers_count":53,"default_branch":"master","last_synced_at":"2024-11-29T17:49:52.173Z","etag":null,"topics":["dark-mode","ios","night-mode","skin","swift","theme","ui"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wxxsw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-15T05:44:49.000Z","updated_at":"2024-11-25T02:21:27.000Z","dependencies_parsed_at":"2022-08-10T02:07:05.961Z","dependency_job_id":null,"html_url":"https://github.com/wxxsw/SwiftTheme","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxxsw%2FSwiftTheme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxxsw%2FSwiftTheme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxxsw%2FSwiftTheme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxxsw%2FSwiftTheme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wxxsw","download_url":"https://codeload.github.com/wxxsw/SwiftTheme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228905550,"owners_count":17989782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dark-mode","ios","night-mode","skin","swift","theme","ui"],"created_at":"2024-01-05T20:16:06.512Z","updated_at":"2024-12-09T14:31:17.556Z","avatar_url":"https://github.com/wxxsw.png","language":"Swift","funding_links":[],"categories":["Libs","UI","Styling [🔝](#readme)","Swift","UI Component"],"sub_categories":["Styling","Font","Other Testing"],"readme":"![SwiftTheme](https://raw.githubusercontent.com/wxxsw/SwiftThemeResources/master/Screenshots/logo.png)\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"#introduction\"\u003eIntroduction\u003c/a\u003e -\n\u003ca href=\"#demos\"\u003eDemos\u003c/a\u003e -\n\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e -\n\u003ca href=\"#documents\"\u003eDocuments\u003c/a\u003e -\n\u003ca href=\"#faq\"\u003eFAQ\u003c/a\u003e -\n\u003ca href=\"#contribution\"\u003eContribution\u003c/a\u003e -\n\u003ca href=\"README_CN.md\"\u003e中文文档\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://developer.apple.com/swift\"\u003e\u003cimg src=\"https://img.shields.io/badge/language-swift5-f48041.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"http://cocoadocs.org/docsets/SwiftTheme\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/v/SwiftTheme.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Carthage/Carthage\"\u003e\u003cimg src=\"https://img.shields.io/badge/carthage-compatible-4BC51D.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://developer.apple.com/ios\"\u003e\u003cimg src=\"https://img.shields.io/badge/platform-iOS%209%2B | tvOS%209%2B-blue.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/wxxsw/SwiftTheme/blob/master/LICENSE\"\u003e\u003cimg src=\"http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Screenshot\n\n![](https://github.com/wxxsw/SwiftThemeResources/blob/master/Screenshots/switch.gif)\n\n\u003e Running：open `SwiftTheme.xcworkspace`, run target `PlistDemo`\n\n## Introduction\n### The Beginning Of The Story\n\nAs part of our project requirement, we need to add night mode to our app. It's not as simple as just changing brightness or alpha on the top-level view—in fact, it needs an entirely new interface: different colors, different alpha, different image cuts. More accurately, \"night mode\" is a theme/skinning feature that can switch between bright theme and dark themes.\n\nSo how do we achieve this? Maybe we can set a global variable that represents the currently selected theme, and use different background colors or image cuts based on the variable during the controller's initialization. But then how do we deal with views that have already been initialized? Yes, we could use notifications to change their colors or image cuts, but this leads to controllers unnecessarily full of notification register/unregister, if...else and UI updating code. Worse, if you forget to unregister the notifications, your app may crash.\n\nAfter some consideration, we put forward higher requirements on the task: create a simple and reusable themes/skinning framework, here as you see.\n\n### Goals\n\nMake SwiftTheme a simple, powerful, high-performance, extensible themes/skinning framework. Provide a unified solution for iOS.\n\n## Demos\n\n\n### Index Mode\n\nVary background color of UIView according to the theme setting:\n\n```swift\nview.theme_backgroundColor = [\"#FFF\", \"#000\"]\n```\n\nVary text color of UILabel and UIButton:\n\n```swift\nlabel.theme_textColor = [\"#000\", \"#FFF\"]\nbutton.theme_setTitleColor([\"#000\", \"#FFF\"], forState: .Normal)\n```\n\nVary image of UIImageView:\n\n```swift\nimageView.theme_image = [\"day\", \"night\"]\n\n// It's ok by using UIImage instances if you don't want to use image names.\nimageView.theme_image = ThemeImagePicker(images: image1, image2)\n```\n\nA miracle happens after you execute the single line of code below!\n\n```swift\n// these numbers represent the parameters' index. \n// eg. \"view.theme_backgroundColor = [\"#FFF\", \"#000\"]\", index 0 represents \"#FFF\", index 1 represents \"#000\"\nThemeManager.setTheme(index: isNight ? 1 : 0)\n```\n\nGet current theme index.\n\n```swift\nThemeManager.currentThemeIndex\t// Readonly\n```\n\n\u003e Index mode is a fast way for the situation: a few themes, but not many, no need to download more new themes.\n\nNotice About Literal:\n\n```swift\n// Wrong example:\nlet colors = [\"#FFF\", \"#000\"]\nview.theme_backgroundColor = colors\n\n// You should write like this:\nview.theme_backgroundColor = [\"#FFF\", \"#000\"]\n// or this:\nlet colorPickers: ThemeColorPicker = [\"#FFF\", \"#000\"]\nview.theme_backgroundColor = colorPickers\n```\n\n\u003e Because theme_backgroundColor accepts an argument of type ThemeColorPicker，not Array. Nevertheless, \"view.theme_backgroundColor = [\"#FFF\", \"#000\"]\" does the same as initializing an instance of ThemeColorPicker by \"Literal\" and passing it to the theme_backgroundColor.\n\n\n\n### Plist/JSON Mode\nYou may want to make your app download and install an indefinite number of themes. To fulfill this requirement, we provide plist mode. Simply put, you write configuration info such as colors, image cuts and so on, in a plist file. Then, you can use their keys in the logic code. So, the plist file and the resource files are used to constitute a theme package.\n\nUsage demo of plist mode.\n\n```swift\nview.theme_backgroundColor = \"Global.backgroundColor\"\nimageView.theme_image = \"SelectedThemeCell.iconImage\"\n```\n\u003e Similar with the index mode. Only the specific parameters become keys. And as such, we give it the extension ability.\n\n\nThe plist file name is the first paramter of the switching method. In this example, the plist file and other resource files are in the application bundle. It's also ok if they are in sandbox.\n\n```swift\nThemeManager.setTheme(plistName: \"Red\", path: .mainBundle)\n```\n\n\u003e plist mode allow you install more themes without modifying logic code. So, you can add the feature that, downloading and installing themes for your app.\n\nthe screenshots of the plist and image files we used above:\n\n![](https://github.com/wxxsw/SwiftThemeResources/blob/master/Screenshots/1.pic.jpg)\n![](https://github.com/wxxsw/SwiftThemeResources/blob/master/Screenshots/2.pic.jpg)\n\n### Objective-C\n\nFully compatible with Objective-C, usage demo:\n\n```objective-c\nlbl.theme_backgroundColor = [ThemeColorPicker pickerWithColors:@[@\"#FAF9F9\", @\"#E2E2E2\"]];\n```\n\n### Features\n- [x] Written in Swift\n- [x] Fully compatible with Objective-C\n- [x] Based on runtime\n- [x] Simple integration\n- [x] Extension property prefix with \"theme_*\", friendly with IDE auto-completion\n- [x] Support UIAppearance\n- [x] Index mode, fast integration\n- [x] Plist mode, extend infinite themes\n- [x] Friendly error logs\n- [x] Strongly typed ThemePicker, detect errors during compilling\n- [x] Complete demos\n\n\n## Installation\n\n#### CocoaPods\n```swift\npod 'SwiftTheme'\nuse_frameworks!\n```\n\n#### Carthage\n```swift\ngithub \"wxxsw/SwiftTheme\"\n```\n\n#### Swift Package Manager\n\n1. Select `Xcode -\u003e File -\u003e Swift Packages -\u003e Add Package Dependency...` \n2. Enter `https://github.com/wxxsw/SwiftTheme`.\n3. Click `Next`, then select the version, complete.\n\n#### Source files\nCopy all the files in \"Sources\" folder into your project\n\n## Documents\n\nNote：`①` usage of index mode `②` usage of plist mode\n\n### *Basic Usage*\n***\n\n#### Configure Appearance\n\nSwiftTheme provides new properties for views, they all beigin with `theme_`. Such as `theme_backgroundColor` corresponds `backgroundColor`.\n\n```swift\n①\nview.theme_backgroundColor = ThemeColorPicker(colors: \"#FFF\", \"#000\")\nview.theme_image = ThemeImagePicker(names: \"day\", \"night\")\n②\nview.theme_backgroundColor = ThemeColorPicker(keyPath: \"SomeColorKeyPath\")\nview.theme_image = ThemeImagePicker(keyPath: \"SomeImageKeyPath\")\n```\n\u003e Different type of properties receive different type of Pickers. Thus, IDE will warn you if you pass a wrong parameter.\n\n#### Switch Themes\n\nWhen you switch themes, all the `theme_` properties you set will update with animation. Usage:\n\n```swift\n①\nThemeManager.setTheme(index: 0) // ThemePickers will use the first parameter, eg. \"#FFF\" \"day\"\nThemeManager.setTheme(index: 1) // ThemePickers will use the second parameter, eg. \"#000\" \"night\"\n②\n// use \"day.plist\" in the appllication bundle as the theme configuration file. \n// In this mode, SwiftTheme will find the resource files in the appllication bundle.\nThemeManager.setTheme(plistName: \"day\", path: .mainBundle)\n// use \"night.plist\" in the sandbox as the theme configuration file, \"someURL\" is its file path. \n// In this mode, SwiftTheme will find the resource files in the same path.\nThemeManager.setTheme(plistName: \"night\", path: .sandbox(someURL))\n// use a dictionary as the theme configuration, but find resource files in the sandbox.(Not recommend)\nThemeManager.setTheme(dict: dict, path: .sandbox(someURL))\n```\n\n#### Custom Behaviors\n\nSwiftTheme posts a notification named `ThemeUpdateNotification` when theme changes, you can observe this notification anywhere and do whatever you want:\n```swift\nNotificationCenter.default.addObserver(\n\tself, \n\tselector: #selector(doSomethingMethod),\n\tname: NSNotification.Name(rawValue: ThemeUpdateNotification), \n\tobject: nil\n)\n```\n```objective-c\n[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(doSomethingMethod) name:@\"ThemeUpdateNotification\" object:nil];\n```\n\n### *Now Supported Properties*\n***\n\n\u003e Child classes inherit the properties from their super class, such as UILabel have theme_alpha inherited from UIView. These properties will not be list in child classes below.\n\n##### UIView\n- var theme_alpha: ThemeCGFloatPicker?\n- var theme_backgroundColor: ThemeColorPicker?\n- var theme_tintColor: ThemeColorPicker?\n\n##### UIApplication\n- func theme_setStatusBarStyle(picker: ThemeStatusBarStylePicker, animated: Bool)\n\n##### UIBarButtonItem\n- var theme_tintColor: ThemeColorPicker?\n\n##### UILabel\n- var theme_font: ThemeFontPicker?\n- var theme_textColor: ThemeColorPicker?\n- var theme_textAttributes: ThemeStringAttributesPicker?\n- var theme_highlightedTextColor: ThemeColorPicker?\n- var theme_shadowColor: ThemeColorPicker?\n\n##### UINavigationBar\n- var theme_barStyle: ThemeBarStylePicker?\n- var theme_barTintColor: ThemeColorPicker?\n- var theme_titleTextAttributes: ThemeDictionaryPicker?\n\n##### UITabBar\n- var theme_barStyle: ThemeBarStylePicker?\n- var theme_barTintColor: ThemeColorPicker?\n\n##### UITableView\n- var theme_separatorColor: ThemeColorPicker?\n\n##### UITextField\n- var theme_font: ThemeFontPicker?\n- var theme_keyboardAppearance: ThemeKeyboardAppearancePicker?\n- var theme_textColor: ThemeColorPicker?\n- var theme_placeholderAttributes: ThemeDictionaryPicker?\n\n##### UITextView\n- var theme_font: ThemeFontPicker?\n- var theme_textColor: ThemeColorPicker?\n\n##### UIToolbar\n- var theme_barStyle: ThemeBarStylePicker?\n- var theme_barTintColor: ThemeColorPicker?\n\n##### UISegmentedControl\n- var theme_selectedSegmentTintColor: ThemeColorPicker?\n- func theme_setTitleTextAttributes(_ picker: ThemeStringAttributesPicker?, forState state: UIControl.State)\n\n##### UISwitch\n- var theme_onTintColor: ThemeColorPicker?\n- var theme_thumbTintColor: ThemeColorPicker?\n\n##### UISlider\n- var theme_thumbTintColor: ThemeColorPicker?\n- var theme_minimumTrackTintColor: ThemeColorPicker?\n- var theme_maximumTrackTintColor: ThemeColorPicker?\n\n##### UISearchBar\n- var theme_barStyle: ThemeBarStylePicker?\n- var theme_barTintColor: ThemeColorPicker?\n\n##### UIProgressView\n- var theme_progressTintColor: ThemeColorPicker?\n- var theme_trackTintColor: ThemeColorPicker?\n\n##### UIPageControl\n- var theme_pageIndicatorTintColor: ThemeColorPicker?\n- var theme_currentPageIndicatorTintColor: ThemeColorPicker?\n\n##### UIImageView\n- var theme_image: ThemeImagePicker?\n\n##### UIActivityIndicatorView\n- var theme_activityIndicatorViewStyle: ThemeActivityIndicatorViewStylePicker?\n\n##### UIButton\n- func theme_setImage(picker: ThemeImagePicker?, forState state: UIControlState)\n- func theme_setBackgroundImage(picker: ThemeImagePicker?, forState state: UIControlState)\n- func theme_setTitleColor(picker: ThemeColorPicker?, forState state: UIControlState)\n- func theme_setAttributedTitle(picker: ThemeAttributedStringPicker?, forState state: UIControlState)\n\n##### CALayer\n- var theme_backgroundColor: ThemeCGColorPicker?\n- var theme_borderWidth: ThemeCGFloatPicker?\n- var theme_borderColor: ThemeCGColorPicker?\n- var theme_shadowColor: ThemeCGColorPicker?\n\n##### CATextLayer\n- var theme_foregroundColor: ThemeCGColorPicker?\n\n##### CAGradientLayer\n- var theme_colors: ThemeAnyPicker?\n\n##### UIRefreshControl\n- var theme_titleAttributes: ThemeDictionaryPicker?\n\n##### UIVisualEffectView\n- var theme_effect: ThemeVisualEffectPicker?\n\n### *Picker*\n***\n\n#### ThemeColorPicker\n```swift\n// supported formats:\n// \"#ffcc00\"\t\tRGB\n// \"#ffcc00dd\"\t\tRGBA\n// \"#FFF\"\t\t\tRGB in short\n// \"#013E\"\t\t\tRGBA in short\n①\nThemeColorPicker(colors: \"#FFFFFF\", \"#000\")\nThemeColorPicker(colors: UIColor.red, UIColor.blue)\nThemeColorPicker.pickerWithColors([\"#FFFFFF\", \"#000\"])\nThemeColorPicker.pickerWithUIColors([UIColor.red, UIColor.blue])\n②\nThemeColorPicker(keyPath: \"someStringKeyPath\")\nThemeColorPicker.pickerWithKeyPath(\"someStringKeyPath\")\n```\n\n#### ThemeImagePicker\n```swift\n①\nThemeImagePicker(names: \"image1\", \"image2\")\nThemeImagePicker.pickerWithNames([\"image1\", \"image2\"])\nThemeImagePicker(images: UIImage(named: \"image1\")!, UIImage(named: \"image2\")!)\nThemeImagePicker.pickerWithImages([UIImage(named: \"image1\")!, UIImage(named: \"image2\")!])\n②\nThemeImagePicker(keyPath: \"someStringKeyPath\")\nThemeImagePicker.pickerWithKeyPath(\"someStringKeyPath\")\n```\n\n#### ThemeCGFloatPicker\n```swift\n①\nThemeCGFloatPicker(floats: 1.0, 0.7)\nThemeCGFloatPicker.pickerWithFloats([1.0, 0.7])\n②\nThemeCGFloatPicker(keyPath: \"someNumberKeyPath\")\nThemeCGFloatPicker.pickerWithKeyPath(\"someNumberKeyPath\")\n```\n\n#### ThemeCGColorPicker\n```swift\n①\nThemeCGColorPicker(colors: \"#FFFFFF\", \"#000\")\nThemeCGColorPicker(colors: UIColor.red, UIColor.blue)\nThemeCGColorPicker(colors: UIColor.red.cgColor, UIColor.blue.cgColor)\nThemeCGColorPicker.pickerWithColors([\"#FFFFFF\", \"#000\"])\nThemeCGColorPicker.pickerWithUIColors([UIColor.blue, UIColor.red])\n②\nThemeCGColorPicker(keyPath: \"someStringKeyPath\")\nThemeCGColorPicker.pickerWithKeyPath(\"someStringKeyPath\")\n```\n\n#### ThemeFontPicker\n```swift\n①\nThemeFontPicker(fonts: UIFont.systemFont(ofSize: 10), UIFont.systemFont(ofSize: 11))\nThemeFontPicker.pickerWithFonts([UIFont.systemFont(ofSize: 10), UIFont.systemFont(ofSize: 11)])\n②\n// name the key you like, but the available values format like this: \"PingFangSC-Regular,16\"\nThemeFontPicker(keyPath: \"someStringKeyPath\")\nThemeFontPicker.pickerWithKeyPath(\"someStringKeyPath\")\n```\n\n#### ThemeDictionaryPicker\n```swift\n①\nThemeDictionaryPicker(dicts: [\"key\": \"value\"], [\"key\": \"value\"])\nThemeDictionaryPicker.pickerWithDicts([[\"key\": \"value\"], [\"key\": \"value\"]])\n②\nThemeDictionaryPicker(keyPath: \"someStringKeyPath\") { (Any?) -\u003e [String: AnyObject]? in ... }\n```\n\n#### ThemeStringAttributesPicker\n```swift\n①\nThemeStringAttributesPicker([\"key\": \"value\"], [\"key\": \"value\"])\nThemeStringAttributesPicker.pickerWithAttributes([NSAttributedStringKey.font: UIFont.systemFont(ofSize: 16)])\n②\nThemeStringAttributesPicker(keyPath: \"someStringKeyPath\") { (Any?) -\u003e [NSAttributedString.Key: Any]? in ... }\n```\n\n#### ThemeAttributedStringPicker\n```swift\n①\nThemeAttributedStringPicker(NSAttributedString(...), NSAttributedString(...))\nThemeAttributedStringPicker.pickerWithAttributedStrings([NSAttributedString(...)])\n②\nThemeAttributedStringPicker(keyPath: \"someStringKeyPath\") { (Any?) -\u003e NSAttributedString? in ... }\n```\n\n#### ThemeBarStylePicker\n```swift\n①\nThemeBarStylePicker(styles: .default, .black)\nThemeBarStylePicker.pickerWithStyles([.default, .black])\nThemeBarStylePicker.pickerWithStringStyles([\"default\", \"black\"])\n②\n// name the key you like, but the available values are \"default\" and \"black\"\nThemeBarStylePicker(keyPath: \"someStringKeyPath\")\nThemeBarStylePicker.pickerWithKeyPath(\"someStringKeyPath\")\n```\n\n#### ThemeStatusBarStylePicker\n```swift\n①\nThemeStatusBarStylePicker(styles: .default, .lightContent, .darkContent)\nThemeStatusBarStylePicker.pickerWithStyles([.default, .lightContent, .darkContent])\nThemeStatusBarStylePicker.pickerWithStringStyles([\"default\", \"lightContent\", \"darkContent\"])\n②\n// name the key you like, but the available values are \"default\", \"lightContent\" and \"darkContent\"\nThemeStatusBarStylePicker(keyPath: \"someStringKeyPath\")\nThemeStatusBarStylePicker.pickerWithKeyPath(\"someStringKeyPath\")\n```\n\n#### ThemeKeyboardAppearancePicker\n```swift\n①\nThemeKeyboardAppearancePicker(styles: .default, .dark, .light)\nThemeKeyboardAppearancePicker.pickerWithStyles([.default, .dark, .light])\nThemeKeyboardAppearancePicker.pickerWithStringStyles([\"default\", \"dark\", \"light\"])\n②\n// name the key you like, but the available values are \"default\", \"dark\" and \"light\"\nThemeKeyboardAppearancePicker(keyPath: \"someStringKeyPath\")\nThemeKeyboardAppearancePicker.pickerWithKeyPath(\"someStringKeyPath\")\n```\n\n#### ThemeActivityIndicatorViewStylePicker\n```swift\n①\nThemeActivityIndicatorViewStylePicker(styles: .whiteLarge, .white, .gray)\nThemeActivityIndicatorViewStylePicker.pickerWithStyles([.whiteLarge, .white, .gray])\nThemeActivityIndicatorViewStylePicker.pickerWithStringStyles([\"whiteLarge\", \"white\", \"gray\"])\n②\n// name the key you like, but the available values are \"whiteLarge\", \"white\" and \"gray\"\nThemeActivityIndicatorViewStylePicker(keyPath: \"someStringKeyPath\")\nThemeActivityIndicatorViewStylePicker.pickerWithKeyPath(\"someStringKeyPath\")\n```\n\n#### ThemeVisualEffectPicker\n```swift\n①\nThemeVisualEffectPicker(effects: UIBlurEffect(style: .light), UIBlurEffect(style: .dark))\nThemeVisualEffectPicker.pickerWithEffects([UIBlurEffect(style: .light), UIBlurEffect(style: .dark)])\nThemeVisualEffectPicker.pickerWithStringEffects([\"light\", \"dark\", \"extralight\", \"prominent\", \"regular\"])\n②\n// name the key you like, but the available values are \"light\", \"dark\", \"extralight\", \"prominent\" and \"regular\"\nThemeVisualEffectPicker(keyPath: \"someStringKeyPath\")\nThemeVisualEffectPicker.pickerWithKeyPath(\"someStringKeyPath\")\n```\n\n#### ThemeAnyPicker\n```swift\n①\nThemeAnyPicker(anys: 0, \"123\", UIColor.red)\nThemeAnyPicker.pickerWithAnys([0, \"123\", UIColor.red])\n②\nThemeAnyPicker(keyPath: \"someStringKeyPath\")\nThemeAnyPicker.pickerWithKeyPath(\"someStringKeyPath\")\n```\n\n### *More*\n\nDownload this project and find more. There are four demo targets:\n\n- `Demo` shows how to use index mode and how to save the last selection of themes and other general usages.\n- `PlistDemo` shows how to use plist mode and how to download themes that packaged in zip files.\n- `JsonDemo` is like `PlistDemo`, but use `json`.\n- `OCDemo` is `Demo`'s Objective-C version.\n- `TVOSDemo` is used to test tvos compatibility.\n\n## FAQ\n\n1.  Why doesn't theme_setStatusBarStyle work as expected?\n\n    In your app's `Info.plist` you will need to set `View Controller-based status bar appearence` to `NO`.\n    \n2.  Can I manually cancel the theme of a property?\n\n    Sure, just make it `nil`—example: `view.theme_backgroundColor = nil`.\n\n## Contribution\n\n### Issue\nIf you find a bug or need a help, you can [create a issue](https://github.com/wxxsw/SwiftTheme/issues/new)\n\n\n### Pull Request\nWe are happy to accept pull requests :D. But please make sure it's needed by most developers and make it simple to use. If you are not sure, create an issue and we can discuss it before you get to coding.\n\n### Contributors\n[Gesen](https://github.com/wxxsw), [Zhoujun](https://github.com/shannonchou), [Kevin Cramer](https://github.com/kcramer)\n\n\n## Lisence\n\nThe MIT License (MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwxxsw%2FSwiftTheme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwxxsw%2FSwiftTheme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwxxsw%2FSwiftTheme/lists"}