Core Animation
来源:互联网 发布:php 读取图片 编辑:程序博客网 时间:2024/04/28 19:28
转自荣芳志的博客:
Core Animation之基础介绍
Core Animation可以翻译为核心动画,它为图形渲染和动画提供了基础。使用核心动画,你只需要设置一些参数比如起点和终点,剩下的帧核心动画为你自动完成。核心动画使用硬件加速,不用消耗cpu资源。其实平时咱们开发的iOS应用都在有意无意的使用了核心动画。动画不会替代View,而是和View一起提供更好的性能。Core Animation通过缓存view上的内容到bitmap,这样bitmap就可以直接在图形硬件上操作。从而提高了性能。
Class
Usage
CAEmitterLayer
Used to implement a Core Animation–based particle emitter system. The emitter layer object controls the generation of the particles and their origin.
CAGradientLayer
Used to draw a color gradient that fills the shape of the layer (within the bounds of any rounded corners).
CAEAGLLayer
/CAOpenGLLayer
Used to set up the backing store and context needed to draw using OpenGL ES (iOS) or OpenGL (OS X).
CAReplicatorLayer
Used when you want to make copies of one or more sublayers automatically. The replicator makes the copies for you and uses the properties you specify to alter the appearance or attributes of the copies.
CAScrollLayer
Used to manage a large scrollable area composed of multiple sublayers.
CAShapeLayer
Used to draw a cubic Bezier spline. Shape layers are advantageous for drawing path-based shapes because they always result in a crisp path, as opposed to a path you draw into a layer’s backing store, which would not look as good when scaled. However, the crisp results do involve rendering the shape on the main thread and caching the results.
CATextLayer
Used to render a plain or attributed string of text.
CATiledLayer
Used to manage a large image that can be divided into smaller tiles and rendered individually with support for zooming in and out of the content.
CATransformLayer
Used to render a true 3D layer hierarchy, rather than the flattened layer hierarchy implemented by other layer classes.
QCCompositionLayer
Used to render a Quartz Composer composition. (OS X only)
- CAAnimationGroup *animGroup = [CAAnimationGroup animation];
- animGroup.animations = [NSArray arrayWithObjects:moveAnim,scaleAnim,opacityAnim, nil];
- animGroup.duration = 1;
- [view.layer addAnimation:animGroup forKey:nil];
- core animation
- Core Animation
- Core Animation
- Core Animation
- Core Animation
- Core Animation
- Core Animation
- Core Animation
- Core Animation
- Core Animation
- Core Animation
- Core Animation
- Core Animation
- Core Animation
- Core animation
- Core Animation
- Core Animation
- Core Animation
- 【设计模式】访问者
- table 中 文字长度大于td宽度,溢出文本用“...”代替
- 【监控】MongoDB的监控首选: mongostat
- C语言位运算详解
- java修改session默认过期时间
- Core Animation
- Android Handler详解
- 从1-49选6个不同的数,输出5组(一)
- day05面向对象特征,类的变量和方法,封装,构造函数,this关键字
- IE 10下动态添加html 无法绑定事件
- PDF全屏快捷键
- 25个增强iOS应用程序性能的提示和技巧
- Java中数据库连接池基本工作原理的详细讲解
- python 列表函数