Latest 1.0
Homepage https://github.com/EvanZhou0319/ZJPageControl
License MIT
Platforms ios 7.0, requires ARC
Frameworks UIKit, Foundation

demo.gif

ZJPageControl is a custom animated page control to replace UIPageControl, inspired by Tamino Martinius.

Requirements

  • iOS 7.0+
  • Xcode 8+

Installation

Manually

Just add the ZJPageControl folder to your project

CocoaPods

use CocoaPods with Podfile:

pod 'ZJPageControl', '~> 1.0'

Usage

Storyboard

Just drop UIView and set it’s class to be ZJPageControl.

ibdesignable.gif

Code

// init
ZJPageControl *pageControl = [[ZJPageControl alloc] initWithFrame:pageControlFrame];
pageControl.numberOfPages = 4;
pageControl.padding = 8;
pageControl.radius = 4;
pageControl.lineWidth = 2;
pageControl.pageIndicatorTintColor = [UIColor blueColor];
pageControl.currentPageIndicatorTintColor = [UIColor redColor];
[pageControl addTarget:self action:@selector(pageControlValueChanged:) forControlEvents:UIControlEventValueChanged];

// set current page
pageControl.currentPage = 2;

// set current page with animation
[pageControl setCurrentPage:2 animated:YES];

License

ZJPageControl is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "ZJPageControl",
    "summary": "ZJPageControl is a custom animated page control to replace UIPageControl.",
    "version": "1.0",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "Evan",
    "homepage": "https://github.com/EvanZhou0319/ZJPageControl",
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/EvanZhou0319/ZJPageControl.git",
        "tag": "1.0"
    },
    "requires_arc": true,
    "source_files": "ZJPageControl",
    "frameworks": [
        "UIKit",
        "Foundation"
    ]
}

Pin It on Pinterest

Share This