ITMeow / GuttlerPageControl

A cute PageControl in Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Guttler Page Control (Swift)

Inspired by Bilibili:

bilibili

Demo:

demo

Install

CocoaPods

The easiest way to use GuttlerPageControl is installing it by CocoaPods. Add these lines to your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'GuttlerPageControl', '~> 0.1.1'

Manually

Clone this repo and throw the source files under Classes folder into your project to use it.

Example

import GuttlerPageControl

// Just init with position and numOfpage
let guttlerPageControl = GuttlerPageControl(center: view.center, pages: numOfpage)

// Must bind pageControl with the scrollView 
guttlerPageControl.bindScrollView = scrollView

// Just invoke scrollWithScrollView(_:) in scrollViewDidScroll(_:)
func scrollViewDidScroll(scrollView: UIScrollView) {
    guttlerPageControl.scrollWithScrollView(scrollView)
}

Acknowledgements

Thanks for onevcat's RandomColorSwift, It's wonderful.

License

This project is licensed under the terms of the MIT license.

About

A cute PageControl in Swift

License:MIT License


Languages

Language:Swift 97.4%Language:Ruby 2.6%