UICollectionView: different size items is not calculated on reused items

前端 未结 4 1012
北海茫月
北海茫月 2021-02-13 22:27

I have a collection view with varied item sizes which i declare in

- (CGSize)collectionView:(UICollectionView *)collectionView
                  layout:(UIColle         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-13 22:38

    You need to Override this function in custom layout class. if you are using custom layout.

    override func shouldInvalidateLayoutForBoundsChange(newBounds: CGRect) -> Bool {
    return true
    }
    

提交回复
热议问题