CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

ZJPageControl 1.0

ZJPageControl 1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Sep 2017

Maintained by [EvanZhou]].



  • By
  • Evan

demo.gif

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

Installation

Manually

Just add the ZJPageControl folder to your project

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];

Requirements

  • iOS 7.0+
  • Xcode 8+

License

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