initialLayoutAttributesForAppearingItemAtIndexPath fired for all visible cells, not just inserted cells

前端 未结 4 1624
醉梦人生
醉梦人生 2021-01-31 11:03

Has anyone seen a decent answer to this problem?

initialLayoutAttributesForAppearingItemAtIndexPath seems to be being called for all visible cells, not just

4条回答
  •  灰色年华
    2021-01-31 11:25

    Make sure you're using new method signature in Swift 3. Autocorrection doesn't work for this method:

    func initialLayoutAttributesForAppearingItem(at itemIndexPath: IndexPath) -> UICollectionViewLayoutAttributes?
    

提交回复
热议问题