iOS:subviews in flexnode cannot be applied

This commit is contained in:
pengfei.zhou 2020-04-15 19:08:10 +08:00 committed by osborn
parent 5d306bbf67
commit 6f89cf440b

View File

@ -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];