             return pauseLinePath
         }
         
-        pauseShapeLayerLeft.path = pauseLine(.Left).CGPath
-        pauseShapeLayerLeft.fillColor = pauseColor.CGColor
-        pauseShapeLayerLeft.hidden = self.playing ? false : true
+        pauseShapeLayerLeft.path = pauseLine(.left).cgPath
+        pauseShapeLayerLeft.fillColor = pauseColor.cgColor
+        pauseShapeLayerLeft.isHidden = self.playing ? false : true
         self.layer.addSublayer(pauseShapeLayerLeft)
         
-        pauseShapeLayerRight.path = pauseLine(.Right).CGPath
-        pauseShapeLayerRight.fillColor = pauseColor.CGColor
-        pauseShapeLayerRight.hidden = self.playing ? false : true
+        pauseShapeLayerRight.path = pauseLine(.right).cgPath
+        pauseShapeLayerRight.fillColor = pauseColor.cgColor
+        pauseShapeLayerRight.isHidden = self.playing ? false : true
         self.layer.addSublayer(pauseShapeLayerRight)
         
         //
         // Play
         //
         
-        let midY = CGRectGetMidY(rect)
-        let playLeftX = CGRectGetWidth(rect) * 0.4107
+        let midY = rect.midY
+        let playLeftX = rect.width * 0.4107
         
         let playPath = UIBezierPath()
-        playPath.lineJoinStyle = CGLineJoin.Round
-        playPath.moveToPoint(CGPointMake(playLeftX, midY))
-        playPath.addLineToPoint(CGPointMake(playLeftX, (midY - CGRectGetHeight(rect) * 0.17)))
-        playPath.addLineToPoint(CGPointMake(playLeftX + (CGRectGetWidth(rect) * 0.2322), midY))
-        playPath.addLineToPoint(CGPointMake(playLeftX, (midY + CGRectGetHeight(rect) * 0.17)))
-        playPath.addLineToPoint(CGPointMake(playLeftX, midY))
-        
-        playShapeLayer.path = playPath.CGPath
-        playShapeLayer.strokeColor = playColor.CGColor
-        playShapeLayer.fillColor = playColor.CGColor
-        playShapeLayer.hidden = self.playing ? true : false
+        playPath.lineJoinStyle = CGLineJoin.round
+        playPath.move(to: CGPoint(x: playLeftX, y: midY))
+        playPath.addLine(to: CGPoint(x: playLeftX, y: (midY - rect.height * 0.17)))
+        playPath.addLine(to: CGPoint(x: playLeftX + (rect.width * 0.2322), y: midY))
+        playPath.addLine(to: CGPoint(x: playLeftX, y: (midY + rect.height * 0.17)))
+        playPath.addLine(to: CGPoint(x: playLeftX, y: midY))
+        
+        playShapeLayer.path = playPath.cgPath
+        playShapeLayer.strokeColor = playColor.cgColor
+        playShapeLayer.fillColor = playColor.cgColor
+        playShapeLayer.isHidden = self.playing ? true : false
         self.layer.addSublayer(playShapeLayer)
         
         // helper
-        func d2R(degrees: CGFloat) -> CGFloat {
+        func d2R(_ degrees: CGFloat) -> CGFloat {
             return degrees * 0.0174532925 // 1 degree ~ 0.0174532925 radians
         }
         
-        let arcWidth = (CGRectGetWidth(rect) * kInnerRadiusScaleFactor)
-        let radius = (CGRectGetMidY(rect) - arcWidth/2)
+        let arcWidth = (rect.width * kInnerRadiusScaleFactor)
+        let radius = (rect.midY - arcWidth/2)
         
         //
         //  Progress 'track'

        }
    }
    
    private var progressTrackShapeLayer: CAShapeLayer = CAShapeLayer()
    
    private var progressShapeLayer: CAShapeLayer = CAShapeLayer()
    
    private var playShapeLayer: CAShapeLayer = CAShapeLayer()
    
    private var pauseShapeLayerLeft: CAShapeLayer = CAShapeLayer()
    
    private var pauseShapeLayerRight: CAShapeLayer = CAShapeLayer()
    
    @IBInspectable public var progressColor: UIColor = salmonColor
    
    @IBInspectable public var progressTrackColor: UIColor = lightGray
    
    @IBInspectable public var playColor: UIColor = darkGray
    
    @IBInspectable public var pauseColor: UIColor = darkGray
    
    //
    //  If actions are not disabled, the progress layer's strokeEnd update will animate by default. Because we update this so many times a second, like 60
    //  times a second, there will be a noticeable lag in the view's representation of the path w/r/t where the current strokeEnd actually 'is'. Turning off animations
    //  solves this b/c the path updates immediately, and since we're updating at such a high number of times per second, it looks smooth when one's looking watching the view.
    //
    @IBInspectable public var progressStrokeEnd: CGFloat = 0 {
        didSet {
            if progressStrokeEnd < 0 || progressStrokeEnd > 1 {
                self.resetProgressLayer()


private let kInnerRadiusScaleFactor = CGFloat(0.05)

@IBDesignable open class SVGPlayButton: UIButton {
    
    @IBInspectable open var playing: Bool = false {
        didSet {
            if playing {
                presentForPlaying()
