         setImage(drawView.image, for: state)
     }
     
-    open func setBackgroundDrawView(_ drawView: DrawingView, for state: UIControlState) {
-        backgroundDrawViewForStateDict.setValueOrRemoveNil(drawView.canDraw ? drawView : nil,
+    open func setBackgroundDrawView(_ drawView: DrawingView?, for state: UIControlState) {
+        backgroundDrawViewForStateDict.setValueOrRemoveNil((drawView?.canDraw ?? false) ? drawView : nil,
                                                            forKey: state.rawValue)
-        setNeedsUpdateBackgrounds()
     }
     
     open func shadow(for state: UIControlState) -> NSShadow? {

    
    fileprivate func updateBackgrounds() {
        for state: UIControlState in [.normal, .disabled, .selected, .highlighted] {
            if let background = backgroundDrawViewForStateDict[state.rawValue] {
                background.frame = bounds
                setBackgroundImage(background.image, for: state)
            }
        }
    }
    

    // MARK: - Variables
    
    private var iconDrawViewForStateDict = [UInt: DrawingView]()
    private var backgroundDrawViewForStateDict = [UInt: DrawingView]() { didSet { setNeedsUpdateBackgrounds() }}
    private var shadowForStateDict = [UInt: NSShadow]()
    private var needsUpdateShadow = true
    private var backgroundSize = CGSize.zero
