YGAttachNodesFromViewHierachy adds only subviews with isYogaEnabled && isIncludedInLayout to the Yoga node tree. However, YGApplyLayoutToViewHierarchy later iterates every UIKit subview and applies the subview's Yoga layout values before recursing, including views that were never attached or measured by Yoga. A plain subview that was not configured with .flex can therefore have its frame replaced with zero or undefined-derived geometry when its FlexLayout ancestor calls layout().
Reproduction: add a normal UIView or UILabel as a subview of a FlexLayout container without accessing its .flex property, give it a nonzero frame, then call the container's .flex.layout(). The non-Flex view should remain untouched because it is not part of the calculated Yoga tree.
Please apply layout only to views represented in the Yoga tree, while preserving the expected behavior for included FlexLayout descendants.
YGAttachNodesFromViewHierachyadds only subviews withisYogaEnabled && isIncludedInLayoutto the Yoga node tree. However,YGApplyLayoutToViewHierarchylater iterates every UIKit subview and applies the subview's Yoga layout values before recursing, including views that were never attached or measured by Yoga. A plain subview that was not configured with.flexcan therefore have its frame replaced with zero or undefined-derived geometry when its FlexLayout ancestor callslayout().Reproduction: add a normal
UIVieworUILabelas a subview of a FlexLayout container without accessing its.flexproperty, give it a nonzero frame, then call the container's.flex.layout(). The non-Flex view should remain untouched because it is not part of the calculated Yoga tree.Please apply layout only to views represented in the Yoga tree, while preserving the expected behavior for included FlexLayout descendants.