我已经实现了集合视图,并使用了2行和2列。滚动3次和4次后,第一次和第二次数据正确显示,项目位置显示不正确。查看附加的带有隐藏产品图片的图片。
- (CGSize)collectionView:(UICollectionView *)collectionView layout: (UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath: (NSIndexPath *)indexPath {
return CGSizeMake(self.mainColview.frame.size.width/2-2, self.mainColview.frame.size.height/2-2);
}
发布于 2016-04-12 17:23:28
禁用集合视图的分页后,它可以正常工作。
https://stackoverflow.com/questions/36028980
复制相似问题