         
         aCoder.encodeObject(self.minimumValueImage, forKey: "minimumValueImage")
         aCoder.encodeObject(self.maximumValueImage, forKey: "maximumValueImage")
+        
+        aCoder.encodeBool(self.continuous, forKey: "continuous")
         
         aCoder.encodeObject(self.thickness, forKey: "thickness")
         

    
    override public func continueTrackingWithTouch(touch: UITouch, withEvent event: UIEvent?) -> Bool {
        let pt = touch.locationInView(self)
        let newValue = valueForLocation(pt)
        self.setValue(newValue, animated: false)
        if (self.continuous) {
            self.sendActionsForControlEvents(UIControlEvents.ValueChanged)
            self.actionBlock?(slider: self, value: newValue)
        }
        return true
    }
    
    override public func endTrackingWithTouch(touch: UITouch?, withEvent event: UIEvent?) {
        if let pt = touch?.locationInView(self) {
            let newValue = valueForLocation(pt)
            self.setValue(newValue, animated: false)
        }
        self.actionBlock?(slider: self, value: _value)
        self.sendActionsForControlEvents([UIControlEvents.ValueChanged, UIControlEvents.TouchUpInside])
    }
    
    //MARK: - Private Variables
    
    private func calculateCurrentThumbPosition() -> CGPoint {
        let diff = self.maximumValue - self.minimumValue

    }
    
    override public func layoutSublayersOfLayer(layer: CALayer) {
        //        super.layoutSublayersOfLayer(layer)
        
        if layer != self.layer {return}
        
