ios - CoreGraphics 和 CoreAnimation 都可以绘制图形,什么情况下用CG,什么情况下用CA
黄舟
黄舟 2017-04-18 09:45:11
0
1
501

如果简单的绘制一个图形,是不是2者都可以,没有区别?
如果需要动画,选择CA。 是这样的吗

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
Ty80

CoreGraphics 多用于2D图像和图片的绘制。

CoreAnimation 多用于动画,View 级别的。

Core Graphics (also known as Quartz) is the native drawing engine for iOS apps and provides support for custom 2D vector- and image-based rendering. Although not as fast as OpenGL ES rendering, this framework is well suited for situations where you want to render custom 2D shapes and images dynamically.

Core Animation (part of the Quartz Core framework) is a foundational technology that optimizes the animation experience of your apps. UIKit views use Core Animation to provide view-level animation support. You can use Core Animation directly when you want more control over the behavior of your animations.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!