Endless
Endless is a lighweight endless page indicator based on UICollectionView and CAShapeLayers.
How to use
Create an Endless-Indicator in your storyboard or code without a width or height constraint. 'Endless' will calculate its intrinsic size at runtime for you. You just need to set the origin.
class ViewController: UIViewController {
@IBOutlet weak private var indicator: Endless.Indicator!
override func viewDidLoad() {
super.viewDidLoad()
let configuration = Endless.Configuration(numberOfDots: 20,
maxNumberOfDots: .seven,
selectedDotColor: .darkGray,
unselectedDotColor: .lightGray,
dotSize: 10,
spacing: 10)
indicator?.setup(with: configuration)
}
}
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Installation
Endless is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Endless'
Author
Sebastian Boldt
License
Endless is available under the MIT license. See the LICENSE file for more info.