iOS:fix GradientLayer

This commit is contained in:
pengfei.zhou 2020-04-07 11:36:35 +08:00 committed by osborn
parent f3c8d1be31
commit e4e5103d7b

View File

@ -140,7 +140,11 @@ - (void)blend:(NSDictionary *)props {
[self afterBlended:props]; [self afterBlended:props];
[self transformProperties]; [self transformProperties];
[self requestLayout]; [self requestLayout];
self.gradientLayer.frame = CGRectMake(0, 0, self.view.width, self.view.height); [self.gradientLayer also:^(CAGradientLayer* it) {
dispatch_async(dispatch_get_main_queue(), ^{
it.frame = CGRectMake(0, 0, self.view.width, self.view.height);
});
}];
} }
- (void)afterBlended:(NSDictionary *)props { - (void)afterBlended:(NSDictionary *)props {