     
     // MARK: Delegate
     
+    /// 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.
     public weak var delegate: ScratchCardViewDelegate? {
         didSet {
             reloadView()


import UIKit

@objc public protocol ScratchCardViewDelegate: class {
    
    /** The top view of the scratch card. Covers the content view. */
    func coverView(for scratchCardView: ScratchCardView) -> UIView
    
    /** The content view of the scratch card. 
     It is initialy covered and is revealed after scratching the view. 
     */
    func contentView(for scratchCardView: ScratchCardView) -> UIView
    
    @objc optional func scratchCardView(_ view: ScratchCardView, didStartScratchingAt point: CGPoint)
    @objc optional func scratchCardView(_ view: ScratchCardView, didScratchTo point: CGPoint)
    @objc optional func scratchCardViewDidEndScratching(_ view: ScratchCardView)
}



    // MARK: Properties
    
    /// The width of the scratch. Default is 30.
    @IBInspectable public var scratchWidth: CGFloat = 30 {
        didSet {
            canvasMaskView.lineWidth = scratchWidth
