From 317cd115ab9680962130805a38406bf49003183d Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Wed, 8 Apr 2020 16:06:57 +0800 Subject: [PATCH] iOS:fix ImageNode requestLayout --- doric-iOS/Pod/Classes/Shader/DoricImageNode.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doric-iOS/Pod/Classes/Shader/DoricImageNode.m b/doric-iOS/Pod/Classes/Shader/DoricImageNode.m index 841103b5..1c5710d4 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricImageNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricImageNode.m @@ -24,6 +24,7 @@ #import "YYWebImage.h" #import "DoricExtensions.h" #import "DoricUtil.h" +#import "DoricSuperNode.h" @interface DoricImageView : YYAnimatedImageView @end @@ -129,7 +130,11 @@ - (void)blendView:(UIImageView *)view forPropName:(NSString *)name propValue:(id @{@"width": @(image.size.width), @"height": @(image.size.height)}, nil]; } - [self requestLayout]; + DoricSuperNode *node = self.superNode; + while (node.superNode != nil) { + node = node.superNode; + } + [node requestLayout]; } }]; } else if ([@"scaleType" isEqualToString:name]) {