Infinite horizontal scrolling using UICollectionView.
Infinite horizontal scrolling using UICollectionView
Adding the following to your Podfile
and running pod install
:
use_frameworks!
pod "InfiniteCollectionView"
import InfiniteCollectionView
@IBOutlet weak var collectionView: InfiniteCollectionView!
collectionView.infiniteDataSource = XXX
collectionView.infiniteDelegate = XXX
// protocol
func number(ofItems collectionView: UICollectionView) -> Int
func collectionView(_ collectionView: UICollectionView, dequeueForItemAt dequeueIndexPath: IndexPath, cellForItemAt usableIndexPath: IndexPath) -> UICollectionViewCell
// optional
func infiniteCollectionView(_ collectionView: UICollectionView, didSelectItemAt usableIndexPath: IndexPath)
func scrollView(_ scrollView: UIScrollView, pageIndex: Int)
This project is made available under the MIT license. See LICENSE file for details.