Latest 0.2.4
Homepage https://github.com/atuooo/PacmanPageControl
License MIT
Platforms ios 8.0, requires ARC
Authors

Let’s play Pac-Man:

demo

Requirements

  • iOS 8.0+
  • Xcode 8+
  • Swift 3

Install

CocoaPods

To integrate PacmanPageControl into your Xcode project using CocoaPods, specify it to a target in your Podfile:

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

target 'MyApp' do
  pod 'PacmanPageControl', '~> 0.2.3'
end

Carthage

Carthage is also supported:

github "atuooo/PacmanPageControl"

Manually

Clone this repo and throw the source files under Sources folder into your project to use it.

Example

// init 
let pacman = PacmanPageControl(frame: pacmanFrame, pageCount: pageCount)
pacman.dotColorStyle = .random(hue: .orange, luminosity: .light)
pacman.pacmanColorStyle = .changeWithDot

// update in UIScrollView Delegate
func scrollViewDidScroll(_ scrollView: UIScrollView) {
    pacman.scroll(with: scrollView)
}

func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
    pacman.lastContentOffsetX = scrollView.contentOffset.x
}

Acknowledgements

Thanks for onevcat’s RandomColorSwift, It’s wonderful.

License

PacmanPageControl is licensed under the terms of the MIT license. See LICENSE for details

Latest podspec

{
    "name": "PacmanPageControl",
    "version": "0.2.4",
    "summary": "Let's play Pac-Man.",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "homepage": "https://github.com/atuooo/PacmanPageControl",
    "authors": {
        "oOatuo": "[email protected]"
    },
    "social_media_url": "https://twitter.com/OoAtuo",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/atuooo/PacmanPageControl.git",
        "tag": "0.2.4"
    },
    "source_files": "Sources/*.swift",
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3.0"
    },
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This