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.reusable = YES;
|
||||||
self.view.clipsToBounds = YES;
|
self.view.clipsToBounds = YES;
|
||||||
}
|
}
|
||||||
|
@end
|
||||||
- (void)requestLayout {
|
|
||||||
[self.view.doricLayout apply];
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
|
@ -120,13 +120,12 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
|
|||||||
DoricSlideItemNode *slideItemNode = [[DoricSlideItemNode alloc] initWithContext:self.doricContext];
|
DoricSlideItemNode *slideItemNode = [[DoricSlideItemNode alloc] initWithContext:self.doricContext];
|
||||||
[slideItemNode initWithSuperNode:self];
|
[slideItemNode initWithSuperNode:self];
|
||||||
cell.doricSlideItemNode = slideItemNode;
|
cell.doricSlideItemNode = slideItemNode;
|
||||||
slideItemNode.view.width = collectionView.width;
|
|
||||||
slideItemNode.view.height = collectionView.height;
|
|
||||||
[cell.contentView addSubview:slideItemNode.view];
|
[cell.contentView addSubview:slideItemNode.view];
|
||||||
}
|
}
|
||||||
DoricSlideItemNode *node = cell.doricSlideItemNode;
|
DoricSlideItemNode *node = cell.doricSlideItemNode;
|
||||||
node.viewId = model[@"id"];
|
node.viewId = model[@"id"];
|
||||||
[node blend:props];
|
[node blend:props];
|
||||||
|
[node.view.doricLayout apply:CGSizeMake(collectionView.width, collectionView.height)];
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user