Latest 1.0.9
Homepage https://github.com/joehour/ScratchCard
License MIT
Platforms ios 8.0, requires ARC
Authors

Installation

CocoaPods

Check out Get Started tab on cocoapods.org.

To use ScratchCard in your project add the following ‘Podfile’ to your project

source 'https://github.com/joehour/ScratchCard.git'
platform :ios, '8.0'
use_frameworks!

pod 'ScratchCard', '~> 1.0.4'

Then run:

pod install

Example

import ScratchCard

class ViewController: UIViewController {

var ScratchCard: ScratchUIView!
override func viewDidLoad() {
    super.viewDidLoad()

    ScratchCard  = ScratchUIView(frame: CGRectMake(50, 80, 320, 480),Coupon: "coupon image", MaskImage: "mask image", ScratchWidth: CGFloat(40))
    self.view.addSubview(ScratchCard)
    }
}

Scratched Percent

It is easy to get the scratched percent.

Example
let scratch_percent:Double = ScratchCard.getScratchPercent()

License

ScratchCard is available under the MIT License.

Copyright © 2016 Joe.

Latest podspec

{
    "name": "ScratchCard",
    "version": "1.0.9",
    "license": "MIT",
    "summary": "A ScratchCard view on iOS(swift).",
    "homepage": "https://github.com/joehour/ScratchCard",
    "authors": {
        "joe": "[email protected]"
    },
    "source": {
        "git": "https://github.com/joehour/ScratchCard.git",
        "tag": "1.0.9"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "ScratchCard/*.{swift}",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This