We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5afefb commit 6fcd6a5Copy full SHA for 6fcd6a5
1 file changed
InfiniteCollectionView/InfiniteCollectionView.swift
@@ -50,6 +50,10 @@ open class InfiniteCollectionView: UICollectionView {
50
open func rotate(_ notification: Notification) {
51
setContentOffset(CGPoint(x: CGFloat(pageIndex + indexOffset) * itemWidth, y: contentOffset.y), animated: false)
52
}
53
+ open override func selectItem(at indexPath: IndexPath?, animated: Bool, scrollPosition: UICollectionViewScrollPosition) {
54
+ let updatedIndexPath = IndexPath(row: correctedIndex(indexPath!.item + indexOffset), section: 0);
55
+ super.selectItem(at: updatedIndexPath, animated: animated, scrollPosition: scrollPosition);
56
+ }
57
58
59
// MARK: - private
0 commit comments