title: How do I draw a sprite on a background using Quartz and CGLayers?
body: <p>I am a newbie in Quartz and I am fighting to understand this stuff apple say is very easy and straightforward.</p>
  
  <p>I have created two CGLayers: one for a fixed background and another one for a sprite. I want this sprite to move.</p>
  
  <p>Both the background context and the sprite context are drawn offscreen and I would like both to be seen on the screen.</p>
  
  <p>To do that - and I am not sure if this is the correct way - I have did the following:</p>
  
  <ol>
  <li>I have created an UIImageView</li>
  <li><p>I have captured the layer's contents using </p>
  
  <p>resultingImage = UIGraphicsGetImageFromCurrentImageContext();<br>
  myView.image = resultingImage;</p></li>
  </ol>
  
  <p>This shows me on the screen the contents of both quartz layers.</p>
  
  <p>Now I have two problems:</p>
  
  <ol>
  <li>This approach is slow as hell</li>
  <li>When I move the layer, I have to repeat the mentioned code and <strong>EVEN DOING THIS, THE LAYER IS NOT MOVING!!!!</strong></li>
  </ol>
  
  <p>So, please, iPhone gurus out there, please tell me if there's another way to do this with quartz and what I have to do to see the sprite moving!!!!</p>
  
  <p>thanks for any help!</p>