From f530256d05826d2629d2f183edb3e9fab78ee5f9 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Wed, 8 Apr 2020 16:41:36 +0800 Subject: [PATCH] iOS:fix slider requestLayout --- doric-iOS/Pod/Classes/Shader/DoricSlideItemNode.m | 6 +----- doric-iOS/Pod/Classes/Shader/DoricSliderNode.m | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/doric-iOS/Pod/Classes/Shader/DoricSlideItemNode.m b/doric-iOS/Pod/Classes/Shader/DoricSlideItemNode.m index 3b9c45c0..9f4187d0 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricSlideItemNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricSlideItemNode.m @@ -35,8 +35,4 @@ - (void)initWithSuperNode:(DoricSuperNode *)superNode { self.reusable = YES; self.view.clipsToBounds = YES; } - -- (void)requestLayout { - [self.view.doricLayout apply]; -} -@end \ No newline at end of file +@end diff --git a/doric-iOS/Pod/Classes/Shader/DoricSliderNode.m b/doric-iOS/Pod/Classes/Shader/DoricSliderNode.m index a9d2bd71..d31d2cf0 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricSliderNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricSliderNode.m @@ -120,13 +120,12 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection DoricSlideItemNode *slideItemNode = [[DoricSlideItemNode alloc] initWithContext:self.doricContext]; [slideItemNode initWithSuperNode:self]; cell.doricSlideItemNode = slideItemNode; - slideItemNode.view.width = collectionView.width; - slideItemNode.view.height = collectionView.height; [cell.contentView addSubview:slideItemNode.view]; } DoricSlideItemNode *node = cell.doricSlideItemNode; node.viewId = model[@"id"]; [node blend:props]; + [node.view.doricLayout apply:CGSizeMake(collectionView.width, collectionView.height)]; return cell; }