From b8ea7c8e82c77a6f87d7503ff7d5b77bcb914c87 Mon Sep 17 00:00:00 2001 From: huangmengfei <934115331@qq.com> Date: Thu, 14 Feb 2019 16:02:35 +0800 Subject: [PATCH] why recursion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit prepare layout递归有什么作用? --- VZFlexLayout/core/VZFlexNode.mm | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/VZFlexLayout/core/VZFlexNode.mm b/VZFlexLayout/core/VZFlexNode.mm index db9065d..d8b31fb 100644 --- a/VZFlexLayout/core/VZFlexNode.mm +++ b/VZFlexLayout/core/VZFlexNode.mm @@ -456,20 +456,8 @@ - (UIEdgeInsets)resultPadding{ }; } -- (void)prepareLayout -{ - for(VZFlexNode* node in self.childNodes) - { - [node prepareLayout]; - } - -} - - (void)layout:(CGSize)constrainedSize{ - //prepare layout递归 - [self prepareLayout]; - Flex_layout(_flex_node, constrainedSize.width, constrainedSize.height, [UIScreen mainScreen].scale); }