MQZHot / ZCycleView

使用UICollectionView实现常见图片无限轮播,支持自定义cell,自定义pageControl,以及轮播样式
MIT License
438 stars 69 forks source link

getCurrentIndex 方法 在阿语环境下就 无法实现了 #36

Open blockshark opened 3 years ago

blockshark commented 3 years ago

正确的写法应该是这样 private func getCurrentIndex() -> Int { let point = self.convert(collectionView.center, to: self.collectionView) let indexPath = self.collectionView.indexPathForItem(at: point) return indexPath?.item ?? 0 }