При использовании UICollectionViewFlowLayout sectionHeadersPinToVisibleBounds = true
в UICollectionView, UICollectionViewDataSourcePrefetching * func prefetchItemsAt indexPaths
всегда повторяет indexPaths, например:
collectionView(_:prefetchItemsAt:) [[0, 4], [0, 5], [0, 6], [0, 7]]
collectionView(_:prefetchItemsAt:) [[0, 4], [0, 5], [0, 6], [0, 7]]
collectionView(_:prefetchItemsAt:) [[0, 4], [0, 5], [0, 6], [0, 7]]
collectionView(_:prefetchItemsAt:) [[0, 4], [0, 5], [0, 6], [0, 7]]
collectionView(_:prefetchItemsAt:) [[0, 4], [0, 5], [0, 6], [0, 7]]
collectionView(_:prefetchItemsAt:) [[0, 4], [0, 5], [0, 6], [0, 7]]
collectionView(_:prefetchItemsAt:) [[0, 4], [0, 5], [0, 6], [0, 7]]
collectionView(_:prefetchItemsAt:) [[0, 4], [0, 5], [0, 6], [0, 7]]
При удалении sectionHeadersPinToVisibleBounds = true
(или установке значения false
) массив indexPaths становится правильным в prefetchItemsAt indexPaths
:
collectionView(_:prefetchItemsAt:) [[0, 4], [0, 5], [0, 6], [0, 7]]
collectionView(_:prefetchItemsAt:) [[0, 4], [0, 5], [0, 6], [0, 7]]
collectionView(_:prefetchItemsAt:) [[0, 8], [0, 9]]
collectionView(_:prefetchItemsAt:) [[0, 10], [0, 11]]
collectionView(_:prefetchItemsAt:) [[0, 12], [0, 13]]
collectionView(_:prefetchItemsAt:) [[0, 14], [0, 15]]
collectionView(_:prefetchItemsAt:) [[0, 16], [0, 17]]
Подскажите, пожалуйста, как это исправить?