ChameleonSwift Versions Save

A pure Swift implemented library(extension) to change/switch app theme/skin 主题切换/换肤

3.1

6 years ago

1, use option instead of confused conf, better implement

3.0

6 years ago

update code to support Swift 4.

2.3.2

7 years ago

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

2.3.1

7 years ago

1, fix compile warning 2, rename: ChameleonCallBackProtocol to ChameleonUIProtocol 3, remove ch_swizzledMethod and make ch_swizzledInstanceMethod private

2.3

7 years ago

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)

2.2

7 years ago
  • 1, func ch_switchTheme(_ now: Any, pre: Any?) no longer available
    • a, your should extension UIView/UIViewController support ChameleonCallBackProtocol
    • b, rename to switchTheme(now: Any, pre: Any?)
  • 2, ThemeSwitchHelper to ChameleonHelper
    • a, func currentTheme() to func current()
  • 3, ch_* function/property not available and use ch.* instead

2.1

7 years ago

1, refactor code: move duplicate to protocol extension 2, api changes:

  • ch_switchTheme(refresh:Bool) to ch_refresh(refresh:Bool)
  • ch_switchTheme<T>(_ data:T) to ch_switch<T>(_ data:T)
  • property: ch_switchThemeBlock to ch_switchBlock
  • use new config api instead of old in ThemeServiceConfig eg: instance.viewAutoSwitchThemeAfterMovedToWindow = true to shared.autoSwitch = [.viewDidMoveToWindow]

2.0

7 years ago

1, support swift 3 2, change AnyObject to Any

1.4

7 years ago

support swift 2.3

1.3

7 years ago

in pre version, if you call ch_switchTheme(refresh: true) will pass wrong data which lead to cannot get correct theme data