随笔分类 -  CAlayer与动画

摘要:动画的组合; caanimationgroup:同一个layer; CATransaction:不同layer; In Core Animation, transactions are a way to group multiple animation-related changes togethe 阅读全文
posted @ 2019-02-11 16:45 zzfx 阅读(582) 评论(0) 推荐(0) 编辑
摘要:CALayer 拥有 mask 属性,Apple 的官方解释如下: An optional layer whose alpha channel is used to mask the layer’s content. The layer’s alpha channel determines how 阅读全文
posted @ 2019-02-01 14:41 zzfx 阅读(566) 评论(0) 推荐(0) 编辑
摘要:数据结构与算法的观点: 数据结构:视图序列; 算法:播放控制; 动画是采用连续播放静止图像的方法产生物体运动的效果。 动画是视图(图像)序列的播放; 动画的内容:图片 包含图片的生成; 图片的处理:合成、光学、几何操作等; 动画的控制:动画的播放控制 播放的基本单元是帧; 播放是将图片序列在时间轴上 阅读全文
posted @ 2019-02-01 13:05 zzfx 阅读(235) 评论(0) 推荐(0) 编辑
摘要:A blog about Core Animation and other iOS graphics frameworks. https://www.calayer.com/ 阅读全文
posted @ 2019-01-31 19:32 zzfx 阅读(113) 评论(0) 推荐(0) 编辑
摘要:矢量图、gpu直接使用、占用内存小 What Shape Layers Are Shape layers are layers capable of defining shapes as vectors. Because they’re defined as vectors, they are re 阅读全文
posted @ 2019-01-31 19:30 zzfx 阅读(187) 评论(0) 推荐(0) 编辑
摘要:例如:我们新建一个SubLayer类继承自CALayer,则在SubLayer.m中重写此方法。如下: + (id)defaultValueForKey:(NSString *)key { if ([key isEqualToString:@"backgroundColor"]) { return 阅读全文
posted @ 2019-01-31 18:23 zzfx 阅读(306) 评论(0) 推荐(0) 编辑
摘要:Transactions are CoreAnimation's mechanism for batching multiple layer- tree operations into atomic updates to the render tree. Every modification to 阅读全文
posted @ 2019-01-31 17:44 zzfx 阅读(891) 评论(0) 推荐(0) 编辑
摘要:动画的定义:视图+时间+空间+速度 视图信息的时空变换; 视图组的按时间逐帧展示; Core Animation 类的继承关系图 Core Animation 类的继承关系图 各类常用属性 CAMediaTiming:CALayer和Core Animation都实现了这个协议,它模拟了一个定时系统 阅读全文
posted @ 2019-01-31 16:51 zzfx 阅读(298) 评论(0) 推荐(0) 编辑
摘要:that you use to animate the views and other visual elements of your app. Core Animation is not a drawing system itself. It is an infrastructure for co 阅读全文
posted @ 2018-07-02 19:12 zzfx 阅读(94) 评论(0) 推荐(0) 编辑
摘要:CAEAGLLayer是CALayer的一个子类,用来显示任意的OpenGL图形。 UIView有个layer属性,可以返回它的主CALayer实例,UIView有一个layerClass方法,返回主layer所使用的类,UIView的子类,可以通过重载这个方法,来让UIView使用不同的CALay 阅读全文
posted @ 2018-07-02 19:03 zzfx 阅读(314) 评论(0) 推荐(0) 编辑
摘要:Core Animation 是对现有图片的操作函数。 https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.h 阅读全文
posted @ 2017-04-19 15:55 zzfx 阅读(129) 评论(0) 推荐(0) 编辑
摘要:Working with High-Resolution Images Layers do not have any inherent knowledge of the resolution of the underlying device’s screen. A layer simply stor 阅读全文
posted @ 2017-04-19 15:50 zzfx 阅读(385) 评论(0) 推荐(0) 编辑
摘要:Layers provide infrastructure for your views. 内核与外壳;数据与封装的关系。 阅读全文
posted @ 2017-04-19 15:27 zzfx 阅读(137) 评论(0) 推荐(0) 编辑
摘要:https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CoreAnimation_guide/CoreAnimationBasics/CoreAnimationBasics.html#//apple_re 阅读全文
posted @ 2017-04-19 15:18 zzfx 阅读(255) 评论(0) 推荐(0) 编辑
摘要:1)iOS动画的模型:三层树模型; CALayer维护数据模型和图片,沟通了CPU和GPU;数据模型和图片本尊有CPU生成和维护;图片动画由GPU合成和呈现; https://developer.apple.com/library/content/documentation/Cocoa/Concep 阅读全文
posted @ 2017-04-19 00:21 zzfx 阅读(241) 评论(0) 推荐(0) 编辑
摘要:http://stackoverflow.com/questions/14042755/coreanimation-confusion-catransaction-vs-catransition-vs-caanimationgroup CATransaction and CATransition a 阅读全文
posted @ 2017-04-18 23:03 zzfx 阅读(385) 评论(0) 推荐(0) 编辑