From d4bf1245dde03d68ed8cefb1ea597d4523b3b734 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Tue, 21 Apr 2020 10:54:21 +0800 Subject: [PATCH] iOS:fix missing call of requestLayout --- doric-iOS/Pod/Classes/Shader/DoricFlowLayoutNode.m | 1 + doric-iOS/Pod/Classes/Shader/DoricListItemNode.m | 2 +- doric-iOS/Pod/Classes/Shader/DoricSliderNode.m | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doric-iOS/Pod/Classes/Shader/DoricFlowLayoutNode.m b/doric-iOS/Pod/Classes/Shader/DoricFlowLayoutNode.m index 55deff2e..8eb21f64 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricFlowLayoutNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricFlowLayoutNode.m @@ -322,6 +322,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection [self callJSResponse:self.onLoadMoreFuncId, nil]; } [node.view.doricLayout apply]; + [node requestLayout]; [self callItem:position size:node.view.frame.size]; return cell; } diff --git a/doric-iOS/Pod/Classes/Shader/DoricListItemNode.m b/doric-iOS/Pod/Classes/Shader/DoricListItemNode.m index 9f4ff439..81eb3628 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricListItemNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricListItemNode.m @@ -36,7 +36,7 @@ - (void)initWithSuperNode:(DoricSuperNode *)superNode { } - (void)requestLayout { - [super requestLayout]; [self.view.doricLayout apply]; + [super requestLayout]; } @end diff --git a/doric-iOS/Pod/Classes/Shader/DoricSliderNode.m b/doric-iOS/Pod/Classes/Shader/DoricSliderNode.m index 10387d83..b740d5c9 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricSliderNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricSliderNode.m @@ -137,6 +137,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection node.viewId = model[@"id"]; [node blend:props]; [node.view.doricLayout apply:CGSizeMake(collectionView.width, collectionView.height)]; + [node requestLayout]; return cell; }