Giter Site home page Giter Site logo

crabmen / zjpagecontrol Goto Github PK

View Code? Open in Web Editor NEW

This project forked from heqikang/zjpagecontrol

0.0 1.0 0.0 1.76 MB

A custom animated PageControl/自定义动画效果的PageControl

Home Page: https://github.com/betacats/ZJPageControl

License: MIT License

Objective-C 95.94% Ruby 4.06%

zjpagecontrol's Introduction

ZJPageControl

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

CocoaPods

Use CocoaPods with Podfile:

pod 'ZJPageControl'

Carthage

Use Carthage with Cartfile

github "betacats/ZJPageControl"

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.

zjpagecontrol's People

Contributors

evanzhou89 avatar zjhub2019 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.