修复bug

This commit is contained in:
liyuhua
2023-11-20 19:29:01 +08:00
parent cbd7b5cdbc
commit 39b64f59b3
17 changed files with 133 additions and 171 deletions

View File

@@ -99,8 +99,8 @@
}
[self.collectionView reloadData];
[self.collectionView.superview layoutIfNeeded];
if(_infoList.count > self.path){
UICollectionViewLayoutAttributes *layoutAttributes = [self.collectionView.collectionViewLayout layoutAttributesForItemAtIndexPath:[NSIndexPath indexPathForRow:self.path inSection:0]];
if(_infoList.count > self.path && self.path > 3){
UICollectionViewLayoutAttributes *layoutAttributes = [self.collectionView.collectionViewLayout layoutAttributesForItemAtIndexPath:[NSIndexPath indexPathForRow:self.path - 3 inSection:0]];
//
CGPoint poiot = CGPointMake(layoutAttributes.frame.origin.x - kGetScaleWidth(10), layoutAttributes.frame.origin.y);
[self.collectionView setContentOffset:poiot animated:YES];