首页 > 技术文章 > CABasicAnimation animationWithKeyPath 一些规定的值

gccbuaa 2017-05-16 08:02 原文

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


推荐阅读