From 6f89cf440b90cc0f6774d374d0cfa8fb4ea03f2a Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Wed, 15 Apr 2020 19:08:10 +0800 Subject: [PATCH] iOS:subviews in flexnode cannot be applied --- doric-iOS/Pod/Classes/Shader/DoricFlexNode.m | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doric-iOS/Pod/Classes/Shader/DoricFlexNode.m b/doric-iOS/Pod/Classes/Shader/DoricFlexNode.m index c734bad1..73637af0 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricFlexNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricFlexNode.m @@ -222,13 +222,12 @@ - (void)requestLayout { if ([view isKindOfClass:[DoricFlexView class]]) { continue; } - if (view.doricLayout.measuredWidth == view.width && view.doricLayout.measuredHeight == view.height) { - continue; + if (view.doricLayout.measuredWidth != view.width || view.doricLayout.measuredHeight != view.height) { + view.doricLayout.widthSpec = DoricLayoutJust; + view.doricLayout.heightSpec = DoricLayoutJust; + view.doricLayout.width = view.width; + view.doricLayout.height = view.height; } - view.doricLayout.widthSpec = DoricLayoutJust; - view.doricLayout.heightSpec = DoricLayoutJust; - view.doricLayout.width = view.width; - view.doricLayout.height = view.height; view.doricLayout.measuredX = view.left; view.doricLayout.measuredY = view.top; [view.doricLayout apply];