title: CALayer renderInContext: Position of Drawing
body: <p>I have a <code>UIView</code> with a custom shape drawn in <code>drawRect:</code>. The <code>frame</code> property is set to:</p>
  
  <pre><code>{5.f, 6.f, 50.f, 50.f}
  </code></pre>
  
  <p>Now, I render the view in an Image Context, but it is ignoring the frame property of the <code>UIView</code>, and always drawing the <code>UIView</code> in the top left.</p>
  
  <pre><code>[_shapeView.layer renderInContext:UIGraphicsGetCurrentContext()];
  </code></pre>
  
  <p>I tried to change the <code>frame</code> of the <code>CALayer</code>, but nothing changed. Modifying the <code>bounds</code> property made things worse. The only work around I found useful was:</p>
  
  <pre><code>CGRect frame = _shapeView.frame;
  CGContextTranslateCTM(context, frame.origin.x, frame.origin.y);
  [_shapeView.layer renderInContext:context];
  </code></pre>
  
  <p>But, this is impractical when I am dealing with many shapes, I want to just use the frame property.</p>