To run the example project, clone the repo, and run pod install
from the Example directory first.
#define FloatValueFromThemeKey(key) (((NSNumber *)[LWThemeManager sharedInstance].theme[(key)]).floatValue)
#define StringValueFromThemeKey(key) ((NSString *)[LWThemeManager sharedInstance].theme[(key)])
#define UIColorValueFromThemeKey(key) ([UIColor theme_colorWithRGBAString:((NSString *)[LWThemeManager sharedInstance].theme[(key)])])
#define CGColorValueFromThemeKey(key) ([UIColor theme_colorWithRGBAString:((NSString *)[LWThemeManager sharedInstance].theme[(key)])].CGColor)
#define FloatValueToThemeFileByKey(fValue,key) ([[LWThemeManager sharedInstance] setThemeValue:(fValue) forKey:(key)])
#define StringValueToThemeFileByKey(strValue,key) ([[LWThemeManager sharedInstance] setThemeValue:(strValue) forKey:(key)])
#define UIColorValueToThemeFileByKey(uicolor,key) ([[LWThemeManager sharedInstance] setThemeValue:([UIColor theme_rgbaStringFromUIColor:uicolor]) forKey:(key)])
#define CGColorValueToThemeFileByKey(cgcolor,key) ([[LWThemeManager sharedInstance] setThemeValue:([UIColor theme_rgbaStringFromUIColor:[[UIColor alloc] initWithCGColor:cgcolor]]) forKey:(key)])
[[LWThemeManager sharedInstance] updateThemeWithName:skinName];
[[LWThemeManager sharedInstance] removeThemeWithName:name];
[[LWThemeManager sharedInstance] copyANewThemeWithName:idString];
[[LWThemeManager sharedInstance] updateThemeWithName:idString value:idString forKey:@"inputView.backgroundImage"];
[[LWThemeManager sharedInstance] recoverDefaultTheme];
NSString *filePath = [LWThemeManager pathInBundleWithFileName:imgName];
LWThemeManager is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'LWThemeManager'
Carthage
github "luowei/LWThemeManager"
luowei, luowei@wodedata.com
LWThemeManager is available under the MIT license. See the LICENSE file for more info.