ScratchCardView
open class ScratchCardView: UIView
The ScratchCardView
-
The width of the scratch. Default is 30.
Declaration
Swift
@IBInspectable public var scratchWidth: CGFloat = 30
-
The percent of total view area that is revealed by the scratches. Computing this property requires heavy CPU work, consider doing it on a backgroung thread if used frequently.
Returns: a value between 0 and 1
Declaration
Swift
public var scratchPercent: Double
-
The delegate for the ScratchCardView
The delegate is responsible for providing the content and cover views. It also gets notified of important events like scratch start or end.
Declaration
Swift
public weak var delegate: ScratchCardViewDelegate?
-
Undocumented
Declaration
Swift
required public init?(coder aDecoder: NSCoder)
-
Undocumented
Declaration
Swift
override open func layoutSubviews()
-
Clears the scratches from the current view
Declaration
Swift
public func clear()
-
Clears the scratches and asks the delegate for a new cover and contant views
Declaration
Swift
public func reloadView()