Skip to content

🛣 A lightweight endless pageControl based on CAShapeLayers and UICollectionView

License

Notifications You must be signed in to change notification settings

SebastianBoldt/Endless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Endless

Endless is a lighweight endless page indicator based on UICollectionView and CAShapeLayers.

Endless: Airbnb or Instragram like Page Indicator

current version current version twitter handle Swift 4.2 compatible platform carthage support license

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

www.sebastianboldt.com

License

Endless is available under the MIT license. See the LICENSE file for more info.