Latest 2.0
Homepage https://github.com/indevizible/CharPageControl
License Apache 2.0
Platforms ios 8.0, requires ARC
Authors

Cocoapods Compatible
Carthage Compatible
![GitHub license](https://img.shields.io/badge/license-Apache 2.0-lightgrey.svg)
Platform
Twitter

CharPageControl is a GLYPH style for pagination written in swift.

Demo

Features

  • [x] Custom font
  • [x] Color transition
  • [x] IBInspectable support

inspecable

  • [ ] IBDesignable support (Error on swift 3)

inspecable

Requirements

  • Swift 2+
  • Swift 3
  • iOS 8.0+

Installation

You can install this library in 2 ways

Manually

Copy CharPageControl.swift to your project.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate CharPageControl into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'CharPageControl', '~> 2.0'

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate CharPageControl into your Xcode project using Carthage, specify it in your Cartfile:

github "indevizible/CharPageControl" ~> 2.0

Run carthage update to build the framework and drag the built CharPageControl.framework into your Xcode project.

Usage

  • Import and declare CharPageControl:
    
    import CharPageControl

class ViewController: UIViewController{
@IBOutlet
var pageControl: CharPageControl!
}


- Drag and drop UILabel from panel to storyboard
- Change UILabel class to **CharPageControl**
- Go to Attribute Inspector and set your pattern and other properties
- Embed label to your ViewController class
- And set page with CGFloat when scrollView did scroll

```swift
func scrollViewDidScroll(scrollView: UIScrollView) {
  let currentPage = (CGFloat(pageCount) * scrollView.contentOffset.x)/scrollView.contentSize.width
  pageControl.currentPage = currentPage
}

And more on CharPageControlExample.xcodeproj

Credit

This project was Inspired by Virakri Jinangkul

Author

Nattawut Singhchai, [email protected]

License

CharPageControl is available under the Apache 2.0 license. See the LICENSE file.

Latest podspec

{
    "name": "CharPageControl",
    "version": "2.0",
    "summary": "CharPageControl is a GLYPH style for pagination written in swift.",
    "homepage": "https://github.com/indevizible/CharPageControl",
    "license": {
        "type": "Apache 2.0",
        "file": "LICENSE"
    },
    "authors": {
        "Nattawut Singhchai": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/indevizible/CharPageControl.git",
        "tag": "2.0"
    },
    "source_files": "CharPageControl/**/*.swift",
    "requires_arc": true
}

Pin It on Pinterest

Share This