A pure Swift implemented library(extension) to change/switch app theme/skin 主题切换/换肤
1, use option instead of confused conf, better implement
update code to support Swift 4.
1, enable UIView and UIViewController support ChameleonUIProtocol: you do not need add extra code to support ChameleonUIProtocol anymore. And if you upgrade you should remove you extension code support ChameleonUIProtocol, or else compile error you may come across
1, fix compile warning 2, rename: ChameleonCallBackProtocol to ChameleonUIProtocol 3, remove ch_swizzledMethod and make ch_swizzledInstanceMethod private
1,change ThemeAutoSwitchType to OptionSet Type 2,ThemeServiceConfig: use property autoSwitch to replace function setAutoSwitch(type:auto:) 3, rename: ChameleonHelper.current() -> ChameleonHelper.current ChameleonHelper.currentThemeData(d:) -> ChameleonHelper.currentData(:d)
1, refactor code: move duplicate to protocol extension 2, api changes:
1, support swift 3 2, change AnyObject to Any
support swift 2.3
in pre version, if you call ch_switchTheme(refresh: true) will pass wrong data which lead to cannot get correct theme data