feat:step6

This commit is contained in:
pengfei.zhou
2019-11-27 17:17:03 +08:00
parent 209a9267fe
commit e3cb635358
4 changed files with 20 additions and 6 deletions

View File

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