Latest 1.0.8
Homepage https://github.com/shima11/FlexiblePageControl
License MIT
Platforms ios 8.0
Authors

A flexible UIPageControl like Instagram.

Carthage compatible
Swift 4.2.x
Support

OverView

FlexiblePageControl

Install

Carthage

For Installing with Carthage, add it to your Cartfile.

github "shima11/FlexiblePageControl"
$ carthage update

CocoaPods

For installing with CocoaPods, add it to your Podfile.

pod "FlexiblePageControl"
$ pod update

Usage

let pageControl = FlexiblePageControl()
pageControl.numberOfPages = 10
view.addSubview(pageControl)

Customize

// color
pageControl.pageIndicatorTintColor = color1
pageControl.currentPageIndicatorTintColor = color2

// size
let config = Config(
    displayCount: 7,
    dotSize: 6,
    dotSpace: 4,
    smallDotSizeRatio: 0.5,
    mediumDotSizeRatio: 0.7
)
pageControl.setConfig(config)

Update page

func scrollViewDidScroll(_ scrollView: UIScrollView) {
    pageControl.setProgress(contentOffsetX: scrollView.contentOffset.x, pageWidth: scrollView.bounds.width)
}

or

pageControl.setCurrentPage(at: page)

Licence

Licence MIT

Latest podspec

{
    "name": "FlexiblePageControl",
    "version": "1.0.8",
    "summary": "FlexiblePageControl is flexible PageControl.",
    "description": "This Framework is flexible PageControl like Instagram.",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "homepage": "https://github.com/shima11/FlexiblePageControl",
    "authors": {
        "shima": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/shima11/FlexiblePageControl.git",
        "tag": "1.0.8"
    },
    "source_files": [
        "FlexiblePageControl",
        "FlexiblePageControl/**/*.{h,m,swift}"
    ]
}

Pin It on Pinterest

Share This