iOS:fix missing call of requestLayout

This commit is contained in:
pengfei.zhou 2020-04-21 10:54:21 +08:00 committed by osborn
parent f6c151900b
commit d4bf1245dd
3 changed files with 3 additions and 1 deletions

View File

@ -322,6 +322,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
[self callJSResponse:self.onLoadMoreFuncId, nil];
}
[node.view.doricLayout apply];
[node requestLayout];
[self callItem:position size:node.view.frame.size];
return cell;
}

View File

@ -36,7 +36,7 @@ - (void)initWithSuperNode:(DoricSuperNode *)superNode {
}
- (void)requestLayout {
[super requestLayout];
[self.view.doricLayout apply];
[super requestLayout];
}
@end

View File

@ -137,6 +137,7 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
node.viewId = model[@"id"];
[node blend:props];
[node.view.doricLayout apply:CGSizeMake(collectionView.width, collectionView.height)];
[node requestLayout];
return cell;
}