Closed bbtyou closed 3 years ago
_gradientLayer.theme_colors = [ThemeCGColorPicker pickerWithKeyPath:_theme_path map:^CGColorRef _Nullable(NSArray list) { NSMutableArray colors = @[].mutableCopy; for (NSString *hex in list) { [colors addObject:(id)HexColor(hex).CGColor]; } return [colors copy]; }];
pickerWithKeyPath返回的是CGColorRef,而不是数组,并且设置了[UIColor redColor].CGColor也没有生效。
Did you find a solution if you did can you show it?
自己监听,重新设置下。
_gradientLayer.theme_colors = [ThemeCGColorPicker pickerWithKeyPath:_theme_path map:^CGColorRef _Nullable(NSArray list) { NSMutableArray colors = @[].mutableCopy; for (NSString *hex in list) { [colors addObject:(id)HexColor(hex).CGColor]; } return [colors copy]; }];
pickerWithKeyPath返回的是CGColorRef,而不是数组,并且设置了[UIColor redColor].CGColor也没有生效。