title: How to draw an UIImage or directly in -drawRect:?
body: <p>I have an <code>UIImage</code> which I want to draw on a <code>UIView</code>. But instead of creating an <code>UIImageView</code> and adding this as a subview, I want to overwrite <code>-drawRect:</code> and draw my UIView directly.</p>
  
  <p>For example, my code looks like:</p>
  
  <pre><code>- (void)drawRect:(CGRect)rect {
      CGContextRef myContext = UIGraphicsGetCurrentContext();
  
      UIImage *img = [UIImage imageNamed:@"foo.png"];
  
      // how to draw the directly into the view now?
  }
  </code></pre>