srs

SRScratchView

A mask imageView class which can be used a scratchView.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

51

Maintenance

Last Commit

2yrs ago

Contributors

1

Package

Dependencies

0

License

MIT

Categories

Readme

SRScratchView

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 5.0
Xcode 11.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

shamshir.anees@gmail.com

License

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100