Closed LiZhimingAlive closed 1 year ago
2022-11-18 09:40:50.493250+0800 ZLCollectionView[5817:59382] <ZLCollectionViewLayoutAttributes: 0x7f7dd6436bd0; index path: (0-0); frame = (10 40; 179.577 30)>
2022-11-18 09:40:54.493031+0800 ZLCollectionView[5817:59382] <ZLCollectionViewLayoutAttributes: 0x7f7dd6644f80; index path: (0-1); frame = (10 80; 184.278 30)>
2022-11-18 09:40:58.493451+0800 ZLCollectionView[5817:59382] <ZLCollectionViewLayoutAttributes: 0x7f7dd6436d60; index path: (0-2); frame = (10 120; 230.178 30)>
2022-11-18 09:41:02.493043+0800 ZLCollectionView[5817:59382] <ZLCollectionViewLayoutAttributes: 0x7f7dd4f2d720; index path: (0-3); frame = (10 160; 214.878 30)>
目前我打印获取是正常的,我虽然重写了layoutAttributesForItemAtIndexPath,但是并没有被调用到
hi,大佬,我们的APP升级到1.4.7后,在获取数据源后reloaddata,然后执行mjrefresh的endrefresh,正常流程下是OK的,中间我们还会插入一组数据到瀑布流中,做banner,调用的也是reloadData,在一些极限情况下会导致item的frame会错位;定位问题发现在mjrefresh的endrefresh后立马调用reloaddata,反复的启动杀死APP调用瀑布流的业务接口,就会触发这个问题,降级到1.4.6之后,重复在mjrefresh的endrefresh后立马调用reloaddata再也不会出现该问题,感觉可能跟上面的同学提出来的正相关😂
1.4.8已删除
最新版本ZLCollectionViewBaseFlowLayout里重写了layoutAttributesForItemAtIndexPath,是通过self.attributesArray[indexPath.item]数组下标获取的,而self.attributesArray数组里是包含header和footer的attribute的,导致通过下标获取的不正确,外部调用layoutAttributesForItemAtIndexPath时获取的的UICollectionViewLayoutAttributes不正确