iOS: fix when Image async load cause super node requestLayout

This commit is contained in:
pengfei.zhou
2021-11-12 16:23:01 +08:00
committed by osborn
parent af77a0e98e
commit 4c80e5aa60
6 changed files with 42 additions and 16 deletions

View File

@@ -152,6 +152,15 @@ - (void)reset {
for (NSString *viewId in self.subNodes.allKeys) {
[[self subNodeWithViewId:viewId] reset];
}
}
- (void)subNodeContentChanged:(DoricViewNode *)subNode {
if (self.superNode
&& (self.view.doricLayout.widthSpec == DoricLayoutFit
|| self.view.doricLayout.heightSpec == DoricLayoutFit)) {
[self.superNode subNodeContentChanged:self];
} else {
[self requestLayout];
}
}
@end