title: How to draw an animated path with multiple colors in ios?
body: <p>I need to draw something like the following image in my iOS app, except that the arc may contain more colors:</p>
  
  <p><img src="https://i.stack.imgur.com/kuaOw.png" alt="Path to draw"></p>
  
  <p>I know how to draw it, but I'm looking for a way to animate the drawing of the path. </p>
  
  <p>There is a similar question <a href="https://stackoverflow.com/questions/27931076/swift-gradient-along-a-bezier-path-using-calayers">here</a>, except that the circle is not animated. <a href="https://stackoverflow.com/questions/26578023/animate-drawing-of-a-circle">This</a> is another question where it's explained how to animate a circle, and it work ok in my case, except that it doesn't handle multiple colors in the path. </p>
  
  <p>How can accomplish this?</p>