iOS:fix slider requestLayout
This commit is contained in:
parent
8b66c7d4be
commit
f530256d05
@ -35,8 +35,4 @@ - (void)initWithSuperNode:(DoricSuperNode *)superNode {
|
||||
self.reusable = YES;
|
||||
self.view.clipsToBounds = YES;
|
||||
}
|
||||
|
||||
- (void)requestLayout {
|
||||
[self.view.doricLayout apply];
|
||||
}
|
||||
@end
|
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user