CABasicAnimation animationWithKeyPath 一些规定的值

CABasicAnimation   animationWithKeyPath   Types

When using the ‘CABasicAnimation’ from the QuartzCore Framework in Objective-C, you have to specify an animationWithKeyPath.  This is
a long string and is not easily listed in the CABasicAnimation, CAPropertyAnimation, or the CAAnimation class.  I ended up finding a handy chart within the Core Animation Programming guide in Apple’s iPhone OS Reference Library.  Hope this helps save someone
time, at least it will for me.

我们能够通过animationWithKeyPath键值对的方式来改变动画
animationWithKeyPath的值:

transform.scale = 比例轉換
transform.scale.x = 闊的比例轉換
transform.scale.y = 高的比例轉換
transform.rotation.z = 平面圖的旋轉
opacity = 透明度

margin
zPosition

backgroundColor

cornerRadius
borderWidth
frame

bounds

contents
contentsRect
cornerRadius

hidden

mask
masksToBounds
position

shadowColor
shadowOffset
shadowOpacity
shadowRadius
时间: 2024-08-09 10:35:17

CABasicAnimation animationWithKeyPath 一些规定的值的相关文章

iOS 动画(三)CABasicAnimation animationWithKeyPath 一些规定的值

转自:http://www.cnblogs.com/pengyingh/articles/2379631.html CABasicAnimation animationWithKeyPath 一些规定的值 CABasicAnimation animationWithKeyPath Types When using the ‘CABasicAnimation’ from the QuartzCore Framework in Objective-C, you have to specify an

zz CABasicAnimation的使用方法

CABasicAnimation类的使用方式就是基本的关键帧动画. 所谓关键帧动画,就是将Layer的属性作为KeyPath来注册,指定动画的起始帧和结束帧,然后自动计算和实现中间的过渡动画的一种动画方式. CABasicAnimation的基本使用顺序 1.引用QuartzCore.framework 将"QuartzCore.framework"这个库添加到项目中.并且在需要使用CABaseAnimation类的地方import头文件. [objc] view plaincopy

iOS - Animation 八种方法

一.//UIView动画 //能够做动画的属性, feame, center, bounds, alpha, transfom, backgroundcolor //iOS4.0 之前如果想做动画, 必须放在开始可提交之前才有效 //对属性更改值是有效值, 最终会对视图作出修改 //开始动画 [UIView beginAnimations:nil context:nil]; //1.设置动画持续的时间 --- 单位 秒 [UIView setAnimationDuration:2]; //2.设

iOS动画:UIView动画和CALayer动画(CABasicAnimation、CAKeyframeAnimation的使用)

iOS中的动画有两种实现方式,一种是UIView来实现动画,另一种动画是通过CALayer来实现,下面介绍两种动画的简单实现: 一.UIView动画的实现 UIView使用Context来实现动画 关键代码: //参数1 动画名称 参数2 要实现动画的对象上下文          [UIView beginAnimations:@"attribute" context:_showImageView];          //设置动画的时间     [UIView setAnimatio

核心动画CABasicAnimation

Core Animation是一组非常强大的动画处理API,使用它能做出非常炫丽的动 画效果,而且往往是事半功倍! 1.开发步骤: 初始化一个动画对象(CAAnimation)并设置一些动画相关属性 添加动画对象到层(CALayer)中,开始执行动画 Core Animation的动画执行过程都是在后台操作的,不会阻塞主线程 2.Core Animation的主要类 提供显示内容的图层类:CALayer及其子类 动画和计时类:CAAnimation及其子类.CAMediaTiming 布局和约束

CABasicAnimation

前言 本教程写了这个效果图的demo,同时总结CABasicAnimation的使用方法. 看完gif动画完,看到了什么?平移.旋转.缩放.闪烁.路径动画. 实现平移动画 实现平移动画,我们可以通过transform.translation或者水平transform.translation.x或者垂直平移transform.translation.y添加动画. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

CABasicAnimation基本使用

简介: CABasicAnimation 自己只有三个property,分别为 fromValue  toValue  ByValue 当你创建一个 CABasicAnimation 时,你需要通过-setFromValue 和-setToValue 来指定一个开始值和结束值. 当你增加基础动画到层中的时候,它开始运行.当用属性做动画完成时,例如用位置属性做动画,层就会立刻 返回到它的初始位置 下面是一些继承的属性 Autoreverses 当你设定这个属性为 YES 时,在它到达目的地之后,动

ios(CoreAnimation核心动画 一) CABasicAnimation动画与锚点

一.position和anchorPoint position:用来设置CALayer在父层中的位置,以父层的左上角为原点(0, 0) anchorPoint(锚点): 称为"定位点"."锚点" 决定着CALayer身上的哪个点会在position属性所指的位置 以自己的左上角为原点(0, 0) 它的x.y取值范围都是0~1,默认值为(0.5, 0.5) 推荐一个连接:http://www.cnblogs.com/wendingding/p/3800736.html

CABasicAnimation 基本动画

CABasicAnimation 基本动画 没有真正的修改属性值 创建 并指定修改的属性     KeyPath: CALayer属性名, 不是所有的属性名都可以 , 只有在头文件中出现的animatable 的属性才可以    可以修改属性的属性, 例如bounds.size    CABasicAnimation * basic =   [CABasicAnimation animationWithKeyPath:@"bounds"];       动画时长    basic.du