From c20f2864abaf5a81dee23139c80801054b73089b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20W=C3=B6hrl?= Date: Wed, 23 Aug 2017 15:25:41 -0700 Subject: [PATCH] Only add UIView nodes to Yoga where they are enabled Summary: Only add UIView nodes to Yoga where they are enabled. We check for it in `isLeaf` but I think we should also check for them in the check for sub views. Closes https://github.com/facebook/yoga/pull/609 Reviewed By: emilsjolander Differential Revision: D5643387 Pulled By: dshahidehpour fbshipit-source-id: a85c62b6b2e0120b2913e7f2df8b094d43ca49a6 --- YogaKit/Source/YGLayout.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YogaKit/Source/YGLayout.m b/YogaKit/Source/YGLayout.m index df4a4821..70e6ed40 100644 --- a/YogaKit/Source/YGLayout.m +++ b/YogaKit/Source/YGLayout.m @@ -361,7 +361,7 @@ static void YGAttachNodesFromViewHierachy(UIView *const view) NSMutableArray *subviewsToInclude = [[NSMutableArray alloc] initWithCapacity:view.subviews.count]; for (UIView *subview in view.subviews) { - if (subview.yoga.isIncludedInLayout) { + if (subview.yoga.isEnabled && subview.yoga.isIncludedInLayout) { [subviewsToInclude addObject:subview]; } }