MCScratchImageView
GIF Showcase
Requirments
iOS 8.0+
Xcode 7.2+
Swift 4.0
Installation
CocoaPods
Manually
Just drag MCScratchImageView.swift
to the project tree
Usage
Import
If you use CocoaPods, first import MCScratchImageView
Define the class variables
Initialize it
Or use StoryBoard.
Set the mask image & radius
Implement the delegate methods:
API declaration
Example Project
In "Example" folder.
Tips
- Don't set the scratchImageView.image directlly, you need to use setMaskImage(paras) to set the mask image.
- Don't set the touch point radius (var spotRadius: CGFloat) directlly.
- The contentMode should use default resize mode.
Author
Minecode, minecoder@163.com
License
MCScratchImageView is available under the MIT license. See the LICENSE file for more info.