石英 2D 层

发布于 2024-09-04 13:21:36 字数 89 浏览 3 评论 0原文

我想使用石英 2D 创建 2 个独立的层。我可以单独处理重绘方法吗?这样我就可以重绘 1 层,而无需重绘整个屏幕或其他层。

是否可以?有代码示例吗?

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 redrawing the whole screen or other layers.

Is it possible? any code sample?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

极致的悲 2024-09-11 13:21:36

是的,这是可能的并且很容易做到。使用 Apple 的 QuartzDemo iPhone 示例代码中的 QuartzViewController/QuartzView 类即可开始。如果您想要特殊的行为,请使用子类。

请参阅此处:

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

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

〃安静 2024-09-11 13:21:36

我来自 Mac 世界。在 Mac 上,您可以创建两个重叠的视图并以这种方式进行处理。在 iPhone 上,我怀疑您会做同样的事情:创建两个 UIView,然后独立处理两个重绘方法。我相信重叠视图在 iPhone 上很好(就像从 10.5 开始在 Mac 上一样)。

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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文