title: Drawing graphs on iOS: Use layers or override drawRect?
body: <p>Reading through the documentation, it's not clear to me if overriding a UIView's drawRect or  using layers is appropriate.  </p>
  
  <p>I am going to be rendering two kinds of graphs.  A line graph and a single-bar bar graph. Both will have ticks along the axis and text aligned with the ticks.  Below I only show four ticks per axis, but there could be more.</p>
  
  <ol>
  <li><p>What is the better way of drawing the ticks? Should I use an individual layer for each tick, or render them all at once on a separate view using <em><code>drawRect</code></em>?</p></li>
  <li><p>Is there another way to render the text other than using a separate <em><code>UILabel</code></em> for each?</p></li>
  <li><p>For the bar graph, I am using a <em><code>CAGradientLayer</code></em> for the bar.  For the line graph, is it even possible to render this using layers?</p></li>
  </ol>
  
  <p><strong>Sample Graph</strong></p>
  
  <p><img src="https://i.stack.imgur.com/4EZlG.png" alt="enter image description here"></p>