             overlayView = imageView
         }
     }
-    @IBInspectable public var maskImage: UIImage! {
+    @IBInspectable public var maskImage: UIImage? {
         didSet{
             layer.mask = CALayer.init()
-            if let maskLayer = self.layer.mask {
+            if let maskLayer = self.layer.mask, maskImage = maskImage {
                 maskLayer.contents = maskImage.CGImage
             }
         }
     }
     
     
-    public var backgroundView: UIView! {
+    public var backgroundView: UIView? {
         willSet{
-            if backgroundView != nil {
+            if let backgroundView = backgroundView {
                 backgroundView.removeFromSuperview()
             }
         }
         didSet{
-            self.addSubview(backgroundView)
-            self.sendSubviewToBack(backgroundView)
-        }
-    }
-    public var overlayView: UIView! {
+            if let backgroundView = backgroundView {
+                self.addSubview(backgroundView)
+                self.sendSubviewToBack(backgroundView)
+            }
+        }
+    }
+    public var overlayView: UIView? {
         willSet{
-            if overlayView != nil {
+            if let overlayView = overlayView {
                 overlayView.removeFromSuperview()
             }
         }
         didSet{
-            self.addSubview(overlayView)
-            self.bringSubviewToFront(overlayView)
-        }
-    }
-    
-    
-    public var handleView: UIView! {
+            if let overlayView = overlayView {
+                self.addSubview(overlayView)
+                self.bringSubviewToFront(overlayView)
+            }
+        }
+    }
+    
+    
+    public var handleView: UIView? {
         willSet{
-            handleView.removeFromSuperview()
-        }
-        didSet{
-            if overlayView != nil {
-                self.insertSubview(handleView, belowSubview: overlayView)
-            } else {
-                self.addSubview(handleView)
-            }
-        }
-    }
-    
-    private var trackingTouch: UITouch?
+            if let handleView = handleView {
+                handleView.removeFromSuperview()
+            }
+        }
+        didSet{
+            if let handleView = handleView {
+                if let overlayView = overlayView {
+                    self.insertSubview(handleView, belowSubview: overlayView)
+                } else {
+                    self.addSubview(handleView)
+                }
+            }
+        }
+    }
     
     
 


public class TFSlideControl: UIControl {
    
    public var sliderStrategy: TFSlideControlSliderStrategyProtocol!
    public var resetAfterValueChange: Bool = false
    
    @IBInspectable public var backgroundImage: UIImage! {
        get{
            if let imageView = backgroundView as? UIImageView {
                return imageView.image

            backgroundView = imageView
        }
    }
    @IBInspectable public var overlayImage: UIImage? {
        get{
            if let imageView = overlayView as? UIImageView {
                return imageView.image
