aloo
aloo

Reputation: 5389

Drawing several transformed images using Quartz on the iPhone

I'm trying to figure out how best to accomplish drawing a scene in an iphone app. Here is the situation:

I'm not really sure where to start - but because things aren't animated too much it doesn't seem like this has to be really performant so I'm thinking Quartz will be the way to go.

Some possible solutions I can think of:

Ideas?

Thanks.

Upvotes: 1

Views: 1220

Answers (2)

amattn
amattn

Reputation: 10065

Mostly agree with Marco. CA is perfect for this work. Set up a view and add a bunch of layers.

A couple of points though.

You can directly draw text using the NSString UIStringDrawing category methods. works really well and don't have the overhead of UILabel.

Drawing with CoreGraphics is not too slow, because CoreAnimation intelligently caches the layer. That is, it's only drawn once and then CA animates a copy unless the layer is sent a setNeedsDisplay message.

Upvotes: 1

Marco Mustapic
Marco Mustapic

Reputation: 3859

Use CoreAnimation CALayers for the imags (you can apply tranformations to them) and UILabels for the text. Drawing with CoreGraphics will be too slow for animating.

Upvotes: 1

Related Questions