         let translateOnCircle = CATransform3DMakeTranslation(-arcRadius/2,
                                                              -circleRadius/2,
                                                              0)
-        
+
         layer.transform =
             CATransform3DConcat(
-                CATransform3DConcat(translateOnCircle,rotateAroundCircle),
+                CATransform3DConcat(translateOnCircle, rotateAroundCircle),
                 translateInViewCenter)
     }
-    
-    func rotateConnector(_ layer:CALayer, forAngle angle:CGFloat)
-    {
+
+    func rotateConnector(_ layer: CALayer, forAngle angle: CGFloat) {
         let rect = self.frame
         layer.setAffineTransform(CGAffineTransform(translationX: rect.width/2, y: rect.height/2).rotated(by: angle))
     }
-    
-    func rotateMovingView()
-    {
+
+    func rotateMovingView() {
         UIView.animate(withDuration: 0.1, animations: {
             self.movingView?.layer.setAffineTransform(CGAffineTransform.identity.rotated(by: self.angle))
-        }) 
-    }
-    
+        })
+    }
+
 }

                                              attribute: NSLayoutAttribute.height,
                                              multiplier: 1,
                                              constant: 0))
        
        self.addConstraint(NSLayoutConstraint(item: movingView!,
                                              attribute: NSLayoutAttribute.centerX,
                                              relatedBy: NSLayoutRelation.equal,


@IBDesignable
open class FRCircleSlider: UIControl {

    @IBInspectable let selectedColor = UIColor.blue
    @IBInspectable let dotColor = UIColor.red
    @IBInspectable let connectorColor = UIColor.yellow
    @IBInspectable let textFont = UIFont.systemFont(ofSize: 12)

    var circleRadius: CGFloat = 250
    var lineWidth: CGFloat = 1
    var circleWidth: CGFloat = 3
    var connectorWidth: CGFloat = 10
    var lineHeight: CGFloat = 10
    let arcRadius: CGFloat = 30

    var value1: CGFloat = 0.1 {
        willSet(value) {
            if(value != value1) {
                getViewAngleFromValue(value)
