Skip to content

Commit fbd93c0

Browse files
committed
can change patternImage for theme inheritance
1 parent e4e913e commit fbd93c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

AWLThemeManager/AWLThemeManager.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ - (UIColor *)colorForKey:(NSString *)key forTheme:(NSString *)themeName
8686
}
8787

8888
NSString *colorValue = [self objectForKey:key forTheme:themeName];
89-
UIColor *color = [self colorFromString:colorValue forTheme: themeName];
89+
UIColor *color = [self colorFromString:colorValue];
9090
if (color == nil && [self isValidString:colorValue]) {
9191
NSArray* referenceColor = [colorValue componentsSeparatedByString:@":"];
9292
colorValue = referenceColor.firstObject;
@@ -99,14 +99,14 @@ - (UIColor *)colorForKey:(NSString *)key forTheme:(NSString *)themeName
9999
return color;
100100
}
101101

102-
- (UIColor*)colorFromString:(NSString*)colorValue forTheme:(NSString *)themeName
102+
- (UIColor*)colorFromString:(NSString*)colorValue
103103
{
104104
if ([self isValidString:colorValue]) {
105105

106106
if ([colorValue hasPrefix: @"#"]) {
107107
NSArray* array = [colorValue componentsSeparatedByString:@","];
108108
NSString* patternName = [array[0] substringFromIndex:1];
109-
UIImage* patternImage = [self imageNamed:patternName forTheme:themeName];
109+
UIImage* patternImage = [self imageNamed:patternName];
110110
if (patternImage == nil) {
111111
return nil;
112112
}

0 commit comments

Comments
 (0)