iOS:fix slider requestLayout

This commit is contained in:
pengfei.zhou 2020-04-08 16:41:36 +08:00 committed by osborn
parent 8b66c7d4be
commit f530256d05
2 changed files with 2 additions and 7 deletions

View File

@ -35,8 +35,4 @@ - (void)initWithSuperNode:(DoricSuperNode *)superNode {
self.reusable = YES;
self.view.clipsToBounds = YES;
}
- (void)requestLayout {
[self.view.doricLayout apply];
}
@end

View File

@ -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;
}