feat:step6
This commit is contained in:
@@ -45,12 +45,18 @@ - (CGSize)sizeThatFits:(CGSize)size {
|
||||
if (self.subviews.count > 0) {
|
||||
CGFloat height = size.height;
|
||||
for (UIView *child in self.subviews) {
|
||||
height = MAX(child.height, height);
|
||||
CGSize childSize = [child measureSize:size];
|
||||
height = MAX(childSize.height, height);
|
||||
}
|
||||
return CGSizeMake(height, size.height);
|
||||
return CGSizeMake(size.width, size.height);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
- (void)layoutSelf:(CGSize)targetSize {
|
||||
[super layoutSelf:targetSize];
|
||||
[self reloadData];
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation DoricSliderNode
|
||||
|
||||
Reference in New Issue
Block a user