Hi,
I am a newbie in Quartz and I am fighting to understand this stuff apple say is very easy and straightforward.
I have created two CGLayers: one for a fixed background and another one for a sprite. I want this sprite to move.
Both the background context and the sprite context are drawn offscreen and I would like both to be seen on the screen.
To do that - and I am not sure if this is the correct way - I have did the following:
- I have created an UIImageView
I have captured the layer's contents using
resultingImage = UIGraphicsGetImageFromCurrentImageContext();
myView.image = resultingImage;
This shows me on the screen the contents of both quartz layers.
Now I have two problems:
- This approach is slow as hell
- When I move the layer, I have to repeat the mentioned code and EVEN DOING THIS, THE LAYER IS NOT MOVING!!!!
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!!!!
thanks for any help!