diff --git a/doric-iOS/Pod/Classes/Shader/DoricViewNode.m b/doric-iOS/Pod/Classes/Shader/DoricViewNode.m index 4a77640e..90b41dcd 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricViewNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricViewNode.m @@ -144,6 +144,7 @@ - (void)blend:(NSDictionary *)props { [self blendView:self.view forPropName:key propValue:value]; } [self transformProperties]; + self.gradientLayer.frame = CGRectMake(0, 0, self.view.width, self.view.height); } - (void)transformProperties { @@ -173,13 +174,11 @@ - (void)blendView:(UIView *)view forPropName:(NSString *)name propValue:(id)prop NSNumber *width = (NSNumber *) prop; if ([width floatValue] >= 0) { view.width = [width floatValue]; - self.gradientLayer.frame = view.bounds; } } else if ([name isEqualToString:@"height"]) { NSNumber *height = (NSNumber *) prop; if ([height floatValue] >= 0) { view.height = [height floatValue]; - self.gradientLayer.frame = view.bounds; } } else if ([name isEqualToString:@"x"]) { view.x = [prop floatValue];