From 95d9158fac030b42e74fa070ab63e7f0856e31a1 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Wed, 8 Apr 2020 11:34:36 +0800 Subject: [PATCH] iOS:fix Flowlayout loadmore then cell's framesize set to zero --- doric-iOS/Pod/Classes/Shader/DoricFlowLayoutNode.m | 1 - doric-iOS/Pod/Classes/Shader/DoricLayouts.m | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doric-iOS/Pod/Classes/Shader/DoricFlowLayoutNode.m b/doric-iOS/Pod/Classes/Shader/DoricFlowLayoutNode.m index f71dfd46..55deff2e 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricFlowLayoutNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricFlowLayoutNode.m @@ -318,7 +318,6 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection node.viewId = model[@"id"]; [node blend:props]; node.view.width = (collectionView.width - (self.columnCount - 1) * self.columnSpace) / self.columnCount; - node.view.height = collectionView.height; if (position > 0 && position >= self.itemCount && self.onLoadMoreFuncId) { [self callJSResponse:self.onLoadMoreFuncId, nil]; } diff --git a/doric-iOS/Pod/Classes/Shader/DoricLayouts.m b/doric-iOS/Pod/Classes/Shader/DoricLayouts.m index b7e27380..f56b1dad 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricLayouts.m +++ b/doric-iOS/Pod/Classes/Shader/DoricLayouts.m @@ -164,9 +164,11 @@ - (void)setFrame { if (!CGAffineTransformEqualToTransform(self.view.transform, CGAffineTransformIdentity)) { return; } - [self.view.subviews forEach:^(__kindof UIView *obj) { - [obj.doricLayout setFrame]; - }]; + if (self.layoutType != DoricUndefined) { + [self.view.subviews forEach:^(__kindof UIView *obj) { + [obj.doricLayout setFrame]; + }]; + } self.view.width = self.measuredWidth; self.view.height = self.measuredHeight; self.view.x = self.measuredX;