Latest 0.1.1
Homepage https://github.com/shamshiranees/SRScratchView
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

CI Status
Version
License
Platform

ScreenShots

ScreenShot

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Swift 3.0+
Xcode 8.0+

Installation

SRScratchView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'SRScratchView'

or add SAScratchView.swift file into your project directory.

Usage

Change class of your imageView to SRSrcatchView.

import SRScratchView

//Add delegate
class ViewController: UIViewController,SRScratchViewDelegate{

override func viewDidLoad() {
super.viewDidLoad()

self.scratchImageView.delegate = self

}

//delegate method
func scratchCardEraseProgress(eraseProgress: Float) {

//Here you will get erase progress in percentage

}
}

Customize


//width of srcatch line
yourView.lineWidth = 40.0

//shape of scrach line
yourView.lineType = .square

Author

[email protected]

License

SRScratchView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "SRScratchView",
    "version": "0.1.1",
    "summary": "SRScratchView is a scratch view",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/shamshiranees/SRScratchView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "[email protected]": "[email protected]"
    },
    "source": {
        "git": "https://github.com/shamshiranees/SRScratchView.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "SRScratchView/Classes/**/*",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This