title: Animate changes in a custom UIView
body: <p>I am implementing a custom circular progress bar for iOS. In my drawRect method I have the following code:</p>
  
  <pre><code>override func drawRect(rect: CGRect) {
      // Drawing code
      let path = UIBezierPath(arcCenter: barCenter, radius: radius, startAngle: CGFloat(0.0), endAngle: CGFloat(2 * M_PI) * progress, clockwise: true)
      color.set()
      path.lineWidth = lineWidth
      path.stroke()
  }
  </code></pre>
  
  <p>Every time the progress property changes I call the setNeedsDisplay() method.</p>
  
  <p>The thing is I want to animate this progress change, i.e. I don't want the view to just jump from 0 to 100. The only way I can think of is using NSTimer. So may be there are some more suitable ways for doing that?</p>