开发者

Quartz 2D Layers

I want to create 2 separate layers using quartz 2D. Can i handle there redraw methods separately? so that i can redraw 1 layer without redr开发者_如何学JAVAawing the whole screen or other layers.

Is it possible? any code sample?


Yes, it's possible and easy to do. Use the QuartzViewController/QuartzView classes in Apple's QuartzDemo iPhone sample code to get started. Use subclasses if you want specialized behavior.

See here:

http://developer.apple.com/IPhone/library/samplecode/QuartzDemo/Introduction/Intro.html


I'm coming from the Mac world. On the Mac, you'd create two overlapping views and deal with it that way. On the iPhone, I suspect you do the same: create two UIViews and then handle the two redraw methods independently. I believe overlapping views are fine on the iPhone (just as they are now on the Mac since 10.5).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜