SebastianBoldt / Endless

🛣 A lightweight endless pageControl based on CAShapeLayers and UICollectionView

Home Page:https://www.sebastianboldt.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

🛣 A lightweight endless pageControl based on CAShapeLayers and UICollectionView

https://www.sebastianboldt.com

License:MIT License


Languages

Language:Swift 95.5%Language:Ruby 4.5%