如何获得visible IndexPath
while scrolling
in collectionView
,我参考了很多link1 https://stackoverflow.com/questions/30281451/iterate-over-all-the-uitablecells-given-a-section-id-swift/32626614#32626614,link2 https://stackoverflow.com/questions/18649920/uicollectionview-current-visible-cell-index But indexPathForCell
Swift 不支持。
您尝试过委托功能吗?
public func indexPathsForVisibleItems() -> [NSIndexPath]
or
collectionView.indexPathsForVisibleItems()
这些必须给你你想要的。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)