iOS:fix Flowlayout loadmore then cell's framesize set to zero

This commit is contained in:
pengfei.zhou 2020-04-08 11:34:36 +08:00 committed by osborn
parent 49df8d4970
commit 95d9158fac
2 changed files with 5 additions and 4 deletions

View File

@ -318,7 +318,6 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
node.viewId = model[@"id"]; node.viewId = model[@"id"];
[node blend:props]; [node blend:props];
node.view.width = (collectionView.width - (self.columnCount - 1) * self.columnSpace) / self.columnCount; node.view.width = (collectionView.width - (self.columnCount - 1) * self.columnSpace) / self.columnCount;
node.view.height = collectionView.height;
if (position > 0 && position >= self.itemCount && self.onLoadMoreFuncId) { if (position > 0 && position >= self.itemCount && self.onLoadMoreFuncId) {
[self callJSResponse:self.onLoadMoreFuncId, nil]; [self callJSResponse:self.onLoadMoreFuncId, nil];
} }

View File

@ -164,9 +164,11 @@ - (void)setFrame {
if (!CGAffineTransformEqualToTransform(self.view.transform, CGAffineTransformIdentity)) { if (!CGAffineTransformEqualToTransform(self.view.transform, CGAffineTransformIdentity)) {
return; return;
} }
[self.view.subviews forEach:^(__kindof UIView *obj) { if (self.layoutType != DoricUndefined) {
[obj.doricLayout setFrame]; [self.view.subviews forEach:^(__kindof UIView *obj) {
}]; [obj.doricLayout setFrame];
}];
}
self.view.width = self.measuredWidth; self.view.width = self.measuredWidth;
self.view.height = self.measuredHeight; self.view.height = self.measuredHeight;
self.view.x = self.measuredX; self.view.x = self.measuredX;