LEETheme Class Reference
Inherits from | NSObject |
---|---|
Declared in | LEETheme.h LEETheme.m |
Other Methods
+ startTheme:
启动主题
+ (void)startTheme:(NSString *)tag
Parameters
tag |
主题标签 |
---|
Discussion
启动主题
Declared In
LEETheme.h
+ defaultTheme:
默认主题 (必设置 , 应用程序最少需要一个默认主题)
+ (void)defaultTheme:(NSString *)tag
Parameters
tag |
主题标签 |
---|
Discussion
默认主题 (必设置 , 应用程序最少需要一个默认主题)
Declared In
LEETheme.h
+ currentThemeTag
当前主题标签
+ (NSString *)currentThemeTag
Return Value
主题标签 tag
Discussion
当前主题标签
Declared In
LEETheme.h
+ allThemeTag
全部主题标签
+ (NSArray *)allThemeTag
Return Value
主题标签集合
Discussion
全部主题标签
Declared In
LEETheme.h
JsonModeExtend Methods
+ addThemeConfigWithJson:Tag:ResourcesPath:
添加主题设置Json
+ (void)addThemeConfigWithJson:(NSString *)json Tag:(NSString *)tag ResourcesPath:(NSString *_Nullable)path
Parameters
json |
json字符串 |
---|---|
tag |
主题标签 |
path |
资源路径 (在Documents目录下的路径 如果资源不在Documents目录下应传入nil 例: ResourcesPath:@@“themeResources/day/”) |
Discussion
添加主题设置Json
Declared In
LEETheme.h
+ removeThemeConfigWithTag:
移除主题设置
+ (void)removeThemeConfigWithTag:(NSString *)tag
Parameters
tag |
主题标签 |
---|
Discussion
移除主题设置
Declared In
LEETheme.h
+ getResourcesPathWithTag:
获取指定主题标签的资源路径
+ (NSString *)getResourcesPathWithTag:(NSString *)tag
Parameters
tag |
主题标签 |
---|
Return Value
资源路径 (如为不存在则返回mainBundle路径)
Discussion
获取指定主题标签的资源路径
Declared In
LEETheme.h
+ getValueWithTag:Identifier:
获取值
+ (id)getValueWithTag:(NSString *)tag Identifier:(NSString *)identifier
Parameters
tag |
主题标签 |
---|---|
identifier |
标识符 |
Return Value
值对象 (UIColor或UIImage或NSString 如为不存在则返回nil)
Discussion
获取值
Declared In
LEETheme.h