title: cannot change a property of swift class circular Loader
body: <p>I created a class in Swift to animate circle loading using this tutorial
  <a href="https://www.raywenderlich.com/94302/implement-circular-image-loader-animation-cashapelayer" rel="nofollow">https://www.raywenderlich.com/94302/implement-circular-image-loader-animation-cashapelayer</a>, everything worked just fine, but when I try to change the color of the stroke in the view controller in which I want to use the class</p>
  
  <pre><code>class CircularLoaderView: UIView {
  let circlePathLayer = CAShapeLayer()
  var circleRadius: CGFloat = 20.0
  var strokeColor = UIColor.whiteColor()
  
  
  override init(frame: CGRect) {
      super.init(frame: frame)
      configure()
  }
  
  required init(coder aDecoder: NSCoder) {
      super.init(coder: aDecoder)!
      configure()
  }
  
  func configure() {
      progress = 0
      circlePathLayer.frame = bounds
      circlePathLayer.lineWidth = 10
      circlePathLayer.fillColor = UIColor.clearColor().CGColor
      circlePathLayer.strokeColor = strokeColor.CGColor
      layer.addSublayer(circlePathLayer)
      backgroundColor = UIColor.clearColor()
  }
  </code></pre>
  
  <p>Then I set properties </p>
  
  <pre><code>//LoadingRing
      progressIndicatorView.removeFromSuperview()
      progressIndicatorView.frame = actionView.bounds
      progressIndicatorView.circleRadius = (recordButtonWhiteRing.frame.size.height - 10) / 2
      progressIndicatorView.progress = 0.0
      progressIndicatorView.strokeColor = UIColor.init(red: 232 / 255.0, green: 28 / 255.0, blue: 45 / 255.0, alpha: 1)
  </code></pre>
  
  <p>But the stroke still appears White instead of the needed color, Please any help!</p>