 
         let path = UIBezierPath()
         if roundedSlider {
-            path.addArcWithCenter(CGPointMake(CGRectGetMinX(sliderRect) + radius, CGRectGetMinY(sliderRect)+radius), radius: radius, startAngle: CGFloat(M_PI)/2, endAngle: -CGFloat(M_PI)/2, clockwise: true)
-            path.addLineToPoint(CGPointMake(CGRectGetMaxX(sliderRect)-radius, CGRectGetMinY(sliderRect)))
-            path.addArcWithCenter(CGPointMake(CGRectGetMaxX(sliderRect)-radius, CGRectGetMinY(sliderRect)+radius), radius: radius, startAngle: -CGFloat(M_PI)/2, endAngle: CGFloat(M_PI)/2, clockwise: true)
-            path.addLineToPoint(CGPointMake(CGRectGetMinX(sliderRect) + radius, CGRectGetMinY(sliderRect)+height))
+            path.addArc(withCenter: CGPoint(x: sliderRect.minX + radius, y: sliderRect.minY+radius), radius: radius, startAngle: CGFloat(M_PI)/2, endAngle: -CGFloat(M_PI)/2, clockwise: true)
+            path.addLine(to: CGPoint(x: sliderRect.maxX-radius, y: sliderRect.minY))
+            path.addArc(withCenter: CGPoint(x: sliderRect.maxX-radius, y: sliderRect.minY+radius), radius: radius, startAngle: -CGFloat(M_PI)/2, endAngle: CGFloat(M_PI)/2, clockwise: true)
+            path.addLine(to: CGPoint(x: sliderRect.minX + radius, y: sliderRect.minY+height))
         }else{
-            path.moveToPoint(CGPointMake(CGRectGetMinX(sliderRect), CGRectGetMinY(sliderRect)+height))
-            path.addLineToPoint(sliderRect.origin)
-            path.addLineToPoint(CGPointMake(CGRectGetMaxX(sliderRect), CGRectGetMinY(sliderRect)))
-            path.addLineToPoint(CGPointMake(CGRectGetMaxX(sliderRect), CGRectGetMinY(sliderRect)+height))
-            path.addLineToPoint(CGPointMake(CGRectGetMinX(sliderRect), CGRectGetMinY(sliderRect)+height))
+            path.move(to: CGPoint(x: sliderRect.minX, y: sliderRect.minY+height))
+            path.addLine(to: sliderRect.origin)
+            path.addLine(to: CGPoint(x: sliderRect.maxX, y: sliderRect.minY))
+            path.addLine(to: CGPoint(x: sliderRect.maxX, y: sliderRect.minY+height))
+            path.addLine(to: CGPoint(x: sliderRect.minX, y: sliderRect.minY+height))
         }
 
         baseColor.setStroke()

    }
    
    ///Slider height property. @IBInspectable
    @IBInspectable public var sliderHeight: Double = 2 {
        didSet{
            if sliderHeight < 1 {
                sliderHeight = 1

let padding:CGFloat = 0;
///Enum of vertical position
public enum VerticalPosition:Int{
    case top = 1
    case center = 2
    case bottom = 3
}

/// - Easily use
