CHIPageControl is a set of cool animated page controls to replace boring UIPageControl.

Overview

CHIPageControl

CHIPageControl is a set of cool animated page controls to replace boring UIPageControl. We were inspired by Jardson Almeida dribbble shot and implemented a few more page controls.

Made with ❤️ by Chili Labs.

Overview

Requirements

  • iOS 8.0+
  • Xcode 8+
  • Swift 3

Installation

Manually

Just add the CHIPageControl folder to your project.

CocoaPods

use CocoaPods with Podfile:

pod 'CHIPageControl', '~> 0.1.3'

# individual page control
pod 'CHIPageControl/Aji'
pod 'CHIPageControl/Aleppo'
pod 'CHIPageControl/Chimayo'
pod 'CHIPageControl/Fresno'
pod 'CHIPageControl/Jalapeno'
pod 'CHIPageControl/Jaloro'
pod 'CHIPageControl/Paprika'
pod 'CHIPageControl/Puya'

Carthage

use Carthage with Cartfile

0.1.3 ">
github "ChiliLabs/CHIPageControl" ~> 0.1.3

Usage

🎨 Storyboards

Just drop UIView and set its class to be one of CHIPageControls.

💻 Code

let pageControl = CHIPageControlAji(frame: CGRect(x: 0, y:0, width: 100, height: 20))
pageControl.numberOfPages = 4
pageControl.radius = 4
pageControl.tintColor = .red
pageControl.currentPageTintColor = .green
pageControl.padding = 6

Adding multiple tintColors

// The size of the array needs to match the numberOfPages or it will throw an fatal error
pageControl.tintColors = [UIColor.black, UIColor.yellow, UIColor.black, UIColor.black]

// or

// If it is the first one, it will fill all colors with the selected tintColor and then replace the colors with the desired one
pageControl.insertTintColor(UIColor.yellow, position: 1)

Updating progress

//update dynamically
pageControl.progress = 0.5

//set progress with animation
pageControl.set(progress: 2, animated: true)

Touch events

You can hear touch events in any of the page indicators.

pageControl.enableTouchEvents = true

Delegate

Implement the CHIBasePageControlDelegate to catch touch events.

func didTouch(pager: CHIBasePageControl, index: Int)

Page Controls 🌶️ 🌶️ 🌶️

CHIPageControlAji

CHIPageControlAleppo

CHIPageControlChimayo

CHIPageControlFresno

CHIPageControlJalapeno

CHIPageControlJaloro

CHIPageControlPaprika

CHIPageControlPuya

License

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

Comments
  • Unrecognized Selector

    Unrecognized Selector

    Has crashing issues in v0.1.7 using swift 4.2

    Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CHIPageControl.WeakProxy updateFrame]: unrecognized selector sent to instance 0x1c4014240
    
    opened by papipons 16
  • SPM Support Not Working

    SPM Support Not Working

    The package has been updated recently with SPM support (#79 and #78), but I get errors with it.

    I am on Xcode 13.0, using the built in Swift Package Manager, and specify the master branch in rules when adding the package.

    When I import the module in my code, I receive the error "No such module 'CHIPageControl'"

    Additionally, I receive a warning which might be related

    found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target /Users/******/Library/Developer/Xcode/DerivedData/*****-aheljstdlofofhcbswicoezhhaqd/SourcePackages/checkouts/CHIPageControl/CHIPageControl/Info.plist

    opened by Cydie 7
  • CHIPageControlFresno layout is broken?

    CHIPageControlFresno layout is broken?

    When I use set(progress:animated:) method, the layout of the CHIPageControlFresno is broken ? ↓Here is my company tech blog about CHIPageControl. http://dev.classmethod.jp/smartphone/chipagecontrol/

    bug 
    opened by cm-kato-jun 6
  • Ambiguous use of 'borderWidth'

    Ambiguous use of 'borderWidth'

    Hi,

    I am trying to use the CHIPageControlAji but in this line: pageIndicator.borderWidth = 1 // this should set the indicator border, right?

    I get this error: Ambiguous use of 'borderWidth'

    • Found this candidate (CHIPageControl.CHIBasePageControl)
    • Found this candidate (Material.UIView)

    I am using :

    Xcode 8.3.1 
    pod 'CHIPageControl', ' ~> 0.1.3'
    pod 'Material', '~> 2.6.3'
    
    opened by leosimas 5
  • Added support to Multiple Tint Colors

    Added support to Multiple Tint Colors

    I was in need of adding tint colors to different pages, everything works the same way (by using the tintColor property) unless you edit the tintColors array or insertTintColor(color:position:)

    Every subclass was updated to support this new feature, they also blend colours when switching places. The active tint color is always the selected (it doesn't change)

    opened by nunoonun 4
  • one question

    one question

    when i used CHIPageControlJalapeno class to make cycleSrollerview demo , i found a bug. For example , i have four images , when the fourth img back to first image , i used self.pageControl.progress = progress; the animation pause for a moment like this picture。 Uploading 0D790545-B2D8-43F1-9863-FCC86BFF5385.png…

    bug 
    opened by Wbqqqq 4
  • Working on above XCode 9.2?

    Working on above XCode 9.2?

    Hello,

    I am trying to integrate this POD in my Objective-C.

    I am facing some issues.

    we have to convert this to bridging header in XCode 8.0

    Can you help me please ?

    opened by muthukrishnanOCS 3
  • animation not working

    animation not working

    `override func viewDidLoad() { super.viewDidLoad()

        splashScrollView.contentSize = CGSize(width: screenSize.width*4, height: screenSize.height)
        splashScrollView.isPagingEnabled = true
        splashScrollView.delegate = self
        self.view.addSubview(splashScrollView)
        
        pageControl = CHIPageControlAji(frame: CGRect(x: (screenSize.width/2)-100, y: screenSize.height-90, width: 200, height: 20))
        pageControl.numberOfPages = 4
        pageControl.radius = 4
        pageControl.tintColor = colorWhite
        pageControl.padding = 6
        self.view.addSubview(pageControl)
        
        self.view.setNeedsUpdateConstraints()
    }
    func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
        
        if (scrollView == splashScrollView) {
            
            let total = scrollView.contentSize.width - scrollView.bounds.width
            let offset = scrollView.contentOffset.x
            let percent = Double(offset / total)
            
            let progress = percent * Double(4 - 1)
            pageControl.set(progress: Int(progress), animated: true)
            
        }
    }`
    
    bug 
    opened by canaksoy 3
  • It will be good to have name of each class below animation

    It will be good to have name of each class below animation

    It will be good to have name of each class below animation that you have on github README.md. Now I need to run every single class to check what effect it produces ;)

    Thanks, KR

    opened by castus 3
  • Unable to build project on pod update

    Unable to build project on pod update

    I have updated "CHIPageControl" pod to latest version '0.1.7'. On building the project I am getting error - "Type 'RunLoopMode' has no member 'common'"

    PFA for the error screenshot. error

    opened by pranita-mindstix 2
  • Code signing issue

    Code signing issue

    I have following error on my storyboard that breaks the view for view controller that I've used page control. it shows all my views as white blank views on the storyboard for related view controller.

    Profile.storyboard: error: IB Designables: Failed to render and update auto layout status for ProfileDetailController (mG7-Ex-hLd): dlopen(CHIPageControl.framework, 1): no suitable image found. Did find: CHIPageControl.framework: required code signature missing for 'CHIPageControl.framework'

    What should I do to fix it? it is so annoying. I am using latest version.

    opened by hsncr 2
  • Accounting for alpha channel in tintColor itself for CHIPageControlAji and CHIPageControlJalapeno

    Accounting for alpha channel in tintColor itself for CHIPageControlAji and CHIPageControlJalapeno

    Alpha component of tintColor (used for inactive circles) is totally ignored. In this pull request this was corrected for CHIPageControlJalapeno and CHIPageControlAji subclasses. Alpha component and inactiveTransparency should multiplied together, which was done.

    opened by yklishevich 0
  • Circular page control

    Circular page control

    Hey, guys! Awesome lib! I was wondering if there is a way to make CHIPageControl circular? I mean, some approach for the case, when I set first current page after the last with proper portal-like animation?

    opened by Ogerets 0
Releases(0.2.1)
Owner
Chili Labs
We make mobile apps. Want the app that will stand out? Hire Us!
Chili Labs
● ○ ○ ○ A nice, animated UIPageControl alternative.

Page Control Installation Usage Example import UIKit import PageControl class ViewController: UIViewController, UIScrollViewDelegate { @IBOu

Kasper Lahti 113 Sep 1, 2022
💥 Beautiful, animated and highly customizable UIPageControl alternative for iOS.

PageControl Requirements iOS 9.0+ Xcode 7.0+ Installation CocoaPods: Add folowing line to Podfile and run 'pod instal'. pod 'Sevruk-PageControl' Or j

Sevruk Development 30 May 2, 2022
FlexiblePageControl - A flexible UIPageControl like Instagram.

FlexiblePageControl A flexible UIPageControl like Instagram. OverView Install Carthage For Installing with Carthage, add it to your Cartfile. github "

shima 732 Dec 26, 2022
This is PageControl Component for OS X. Inspired by UIPageControl and BFPageControl

NSPageControl This is PageControl Component for OS X. Inspired by UIPageControl and BFPageControl. Demo ##Installation NSPageControl supports multiple

Kohei Tabata 13 Jan 19, 2022
iPages 📖 Quickly implement swipable page views in iOS

iPages ?? Quickly implement swipable page views in iOS. ?? Get Started | Examples | Customize | Install | Get Started Install iPages Add iPages to you

Benjamin Sage 169 Dec 25, 2022
📖 A simple, highly informative page view controller

TL;DR UIPageViewController done properly. ⭐️ Features Simplified data source management & enhanced delegation. Dynamically insert & remove pages. Infi

UI At Six 1.8k Jan 5, 2023
This is a selection of custom page controls to replace UIPageControl

PageControls This is a selection of custom page controls to replace UIPageControl, inspired by a dribbble found here. The appearance (color, size, # o

Kyle Zaragoza 1k Jan 2, 2023
Boring-example - Using boring crate from iOS application

BoringSSL example Using boring crate from iOS application. Checkout git clone gi

Alexei Lozovsky 0 Dec 31, 2021
Reading animation allows you to click on the different page numbers and accordingly it will animate page changes in a cool way. It has a very attractive UI and is very easy to use.

Reading Animation Cool Reading Animation in iOS written in Swift. Preview Table of content :- Description How to add in your project Requirement Licen

MindInventory 42 Oct 4, 2022
Controls-Practice-UIKit- - Controls Practice (UIKit)

Controls Practice (UIKit) Change a number 0 to 255 different ways: Button (+1) I

null 1 Feb 13, 2022
A set of libraries to help users find and replace native system emojis with EmojiOne in their app or website.

This repository is now maintained as JoyPixels/emoji-toolkit. You'll find the latest version of our resources at emoji-toolkit. Please see the UPGRADE

JoyPixels Inc. 4.5k Dec 24, 2022
● ○ ○ ○ A nice, animated UIPageControl alternative.

Page Control Installation Usage Example import UIKit import PageControl class ViewController: UIViewController, UIScrollViewDelegate { @IBOu

Kasper Lahti 113 Sep 1, 2022
💥 Beautiful, animated and highly customizable UIPageControl alternative for iOS.

PageControl Requirements iOS 9.0+ Xcode 7.0+ Installation CocoaPods: Add folowing line to Podfile and run 'pod instal'. pod 'Sevruk-PageControl' Or j

Sevruk Development 30 May 2, 2022
A PageView Swiping to the left will go to previous page and swiping to the right will go to next page

PageView This package creates a PageView. Swiping to the left will go to previous page and swiping to the right will go to next page. You can find how

null 0 Oct 20, 2021
Cool Animated music indicator view written in Swift

Cool Animated music indicator view written in Swift. ESTMusicIndicator is an implementation of NAKPlaybackIndicatorView in Swift for iOS 8. 本人著作的书籍《La

Aufree 465 Nov 28, 2022
Cool Animated music indicator view written in Swift

Cool Animated music indicator view written in Swift. ESTMusicIndicator is an implementation of NAKPlaybackIndicatorView in Swift for iOS 8. 本人著作的书籍《La

Aufree 465 Nov 28, 2022
FlexiblePageControl - A flexible UIPageControl like Instagram.

FlexiblePageControl A flexible UIPageControl like Instagram. OverView Install Carthage For Installing with Carthage, add it to your Cartfile. github "

shima 732 Dec 26, 2022
This is PageControl Component for OS X. Inspired by UIPageControl and BFPageControl

NSPageControl This is PageControl Component for OS X. Inspired by UIPageControl and BFPageControl. Demo ##Installation NSPageControl supports multiple

Kohei Tabata 13 Jan 19, 2022
Replace your Xcode icon with colorful variants

XcoatOfPaint Have you ever wished the Xcode icon could get a fresh coat of paint to match the colorful Mac you just bought? Or you want to distinguish

Christian Lobach 163 Dec 20, 2022
Jogendra 113 Nov 28, 2022