iOS:fix when reuse viewnode,gradientColor display none

This commit is contained in:
pengfei.zhou 2020-04-22 13:39:10 +08:00 committed by osborn
parent aa368d2e4b
commit a1c0e8e30c

View File

@ -174,6 +174,8 @@ - (void)blendView:(UIView *)view forPropName:(NSString *)name propValue:(id)prop
} else if ([name isEqualToString:@"backgroundColor"]) {
if ([prop isKindOfClass:[NSNumber class]]) {
view.backgroundColor = DoricColor(prop);
self.gradientProps = nil;
self.gradientSize = CGSizeZero;
} else if ([prop isKindOfClass:[NSDictionary class]]) {
self.gradientProps = prop;
}