InfiniteCarousel
InfiniteCarousel is a lightweight lib, that provides implementation of horizontal infinite collection view to display paginated items of equal-sized items
One should use carouselDataSource
instead of dataSource
and delegate
.
For autoscrolling see isAutoscrollEnabled
.
Underneath algorithm can be described as followed:
- Putting last at the index 0, and first item at the end: [4], [1], [2], [3], [4], [1]
- While scrolling, whenever user reaches the first or the last index – scroll without animation to respectively the same item, but not at the sides.
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Prerequisites
- Use equal-sized cells
- Use fullscreen width cells
Installation
InfiniteCarousel is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'InfiniteCarouselCollectionView'
Author
Filipp Fediakov, Twitter
Special thanks to @ilyailya
License
InfiniteCarousel is available under the MIT license. See the LICENSE file for more info.