ScratchImage is scratchable UIImageView
Screenshots
Usage
Initialization
let scratchImage = ScratchImageView(image: UIImage(named: "image"))
let scratchImage = ScratchImageView(imageColor: .brown)
Reset
scratchImage.reset()
Scratched precent
scratchImage.scratchedPercent
Line
// line type
scratchImage.lineType = .square // .butt, .round
// line width
scratchImage.lineWidth = 10.0
Installation
CocoaPods (iOS 8+)
platform :ios, '8.0'
use_frameworks!
target '<Your Target Name>' do
pod 'ScratchImage'
end
Carthage (iOS 8+)
github "cashwalk/ScratchImage"
LICENSE
These works are available under the MIT license. See the LICENSE file for more info.