feat:fix Refreshable pulldown and so on
This commit is contained in:
@@ -543,7 +543,7 @@ - (CGSize)targetLayoutSize {
|
||||
width = self.superview.width;
|
||||
}
|
||||
if (self.layoutConfig.heightSpec == DoricLayoutAtMost
|
||||
|| self.layoutConfig.widthSpec == DoricLayoutWrapContent) {
|
||||
|| self.layoutConfig.heightSpec == DoricLayoutWrapContent) {
|
||||
height = self.superview.height;
|
||||
}
|
||||
return CGSizeMake(width, height);
|
||||
|
@@ -36,10 +36,13 @@ @implementation DoricTableView
|
||||
- (CGSize)sizeThatFits:(CGSize)size {
|
||||
if (self.subviews.count > 0) {
|
||||
CGFloat width = size.width;
|
||||
CGFloat height = 0;
|
||||
|
||||
for (UIView *child in self.subviews) {
|
||||
width = MAX(child.width, width);
|
||||
height += child.height;
|
||||
}
|
||||
return CGSizeMake(width, size.width);
|
||||
return CGSizeMake(width, height);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
@@ -74,9 +77,11 @@ - (UITableView *)build {
|
||||
- (void)blendView:(UITableView *)view forPropName:(NSString *)name propValue:(id)prop {
|
||||
if ([@"itemCount" isEqualToString:name]) {
|
||||
self.itemCount = [prop unsignedIntegerValue];
|
||||
[self.view reloadData];
|
||||
} else if ([@"renderItem" isEqualToString:name]) {
|
||||
[self.itemViewIds removeAllObjects];
|
||||
[self clearSubModel];
|
||||
[self.view reloadData];
|
||||
} else if ([@"batchCount" isEqualToString:name]) {
|
||||
self.batchCount = [prop unsignedIntegerValue];
|
||||
} else {
|
||||
|
@@ -80,9 +80,11 @@ - (UICollectionView *)build {
|
||||
- (void)blendView:(UICollectionView *)view forPropName:(NSString *)name propValue:(id)prop {
|
||||
if ([@"itemCount" isEqualToString:name]) {
|
||||
self.itemCount = [prop unsignedIntegerValue];
|
||||
[self.view reloadData];
|
||||
} else if ([@"renderPage" isEqualToString:name]) {
|
||||
[self.itemViewIds removeAllObjects];
|
||||
[self clearSubModel];
|
||||
[self.view reloadData];
|
||||
} else if ([@"batchCount" isEqualToString:name]) {
|
||||
self.batchCount = [prop unsignedIntegerValue];
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user