StickyDots
A page indicator with a little bit of style
Usage
From swift:
import StickyDots
Then, create an image of StickyDotsView, and either
A. attach it to a scrollview
let dotsView = StickyDotsView(frame: CGRect(x: 0, y: 0, width: 0, height: 10), attachedTo: scrollView)
or
B. manually assign the width of your view and the number of pages, and call the updatePageIndicator(offset:CGFloat)
method
And that's it!
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Installation
StickyDots is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'StickyDots'
License
StickyDots is available under the MIT license. See the LICENSE file for more info.