Core Animation 学习

core animation 是在UIKit层之下的一个图形库,用于在iOS 和 OS X 实现动画。

Core Animation管理App内容

  core animation不是一个完整的绘图系统,它是将App内容合成、操纵并应用于硬件的一个基础框架。

  他的核心是Layer对象,大多情况,layer被用来管理view的内容,不过我们仍然可以创建独立的layer。

 Layer 修改触发动画

  layer类似于view,有一些属性可以修改:bounds rectangle, a position onscreen, an opacity, a transform, and many other visually-oriented properties。

Layer可以被组织划分层次

  layer的层次类似于view的层次,有parent-child的关系。

Action 使我们可以改变Layer的默认特性

  隐式动画由action完成,core animation使用action实现layer相关的动画集合。action也可以自定义。

时间: 2024-12-14 23:52:18

Core Animation 学习的相关文章

Core Animation学习总结

目录: The Layer Beneath The Layer Tree(图层树) The Backing Image(寄宿层) Layer Geometry(图层几何学) Visual Effects(视觉效果) Transforms(变换) Specialized Layers(专有图层) Setting Things in Motion Implicit Animations(隐式动画) Explicit Animations(显式动画) Layer Time(图层时间) Easing(缓

媒体层图形技术之Core Animation 学习笔记

1.CADisplayLink //自行定義的函式,用來設定使用CADisplayLink的相關參數 -(void)initializeTimer { //theTimer是CADisplayLink型態的指標,用來存放當前的設定狀態 theTimer = [CADisplayLink displayLinkWithTarget:self selector:@selector(countTotalFrames)]; //CADisplayLink內定值就是每秒60張(參數=1),參數=2就是每秒

Core Animation学习笔记( 转)

CATransactions CATransaction 事务类,可以对多个layer的属性同时进行修改.它分隐式事务,和显式事务. 区分隐式动画和隐式事务:隐式动画通过隐式事务实现动画 . 区分显式动画和显式事务:显式动画有多种实现方式,显式事务是一种实现显式动画的方式. 1.隐式事务 除显式事务外,任何对于CALayer属性的修改,都是隐式事务.这样的事务会在run-loop中被提交. - (void)viewDidLoad {    //初始化一个layer,添加到主视图    layer

iOS Core Animation学习总结(3)--动画的基本类型

一. CABasicAnimation (基础动画) 移位: CABasicAnimation *animation = [CABasicAnimation animation]; //keyPath指定动画类别,position表示移位 animation.keyPath = @"position"; //移动到x=200,y=200的位置 animation.toValue = [NSValue valueWithCGPoint:CGPointMake(200, 200)]; an

Core Animation 学习笔记(一)

看到网易贴吧的点赞的动画,模仿做了个差不多的效果 -(void)zanAction { UILabel *oneLbl =[[UILabel alloc]init]; oneLbl.frame = CGRectMake(_zanBtn.frame.origin.x, _zanBtn.frame.origin.y, 35, 20); oneLbl.text [email protected]"+1"; oneLbl.font = [UIFont boldSystemFontOfSize:

转 iOS Core Animation 动画 入门学习(一)基础

iOS Core Animation 动画 入门学习(一)基础 reference:https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40004514 在iOS中,每个view中都自动配置了一个layer,我们不能人为新建,而在Mac OS中,view默认是没有

IOS Core Animation Advanced Techniques的学习笔记(五)

第六章:Specialized Layers   类别 用途 CAEmitterLayer 用于实现基于Core Animation粒子发射系统.发射器层对象控制粒子的生成和起源 CAGradientLayer 用于绘制一个颜色渐变填充图层的形状(所有圆角矩形边界内的部分) CAEAGLLayer/CAOpenGLLayer 用于设置需要使用OpenGL ES(iOS)或OpenGL(OS X)绘制的内容与内容储备. CAReplicatorLayer 当你想自动生成一个或多个子层的拷贝.复制器

IOS Core Animation Advanced Techniques的学习笔记(四)

第五章:Transforms Affine Transforms CGAffineTransform是二维的 Creating a CGAffineTransform 主要有三种变化方法 旋转: CGAffineTransformMakeRotation(CGFloat angle) 缩放: CGAffineTransformMakeScale(CGFloat sx, CGFloat sy) 移动: CGAffineTransformMakeTranslation(CGFloat tx, CGF

IOS Core Animation Advanced Techniques的学习笔记(一)

转载. Book Description Publication Date: August 12, 2013 Core Animation is the technology underlying Apple’s iOS user interface. By unleashing the full power of Core Animation, you can enhance your app with impressive 2D and 3D visual effects and creat