代码改变世界

CABasicAnimation animationWithKeyPath 的类型

2013-03-22 10:43  三戒1993  阅读(91)  评论(0编辑  收藏  举报


[CABasicAnimation animationWithKeyPath:@"position"];

animationWithKeyPath后面的属性不能随便填,它必须是CALayer的某项属性,你下面写的代码才会对应的去执行改变该属性的效果。

animationWithKeyPath的值:

opacity
margin
zPosition
backgroundColor
cornerRadius
borderWidth 
bounds
contents
contentsRect
cornerRadius
frame
hidden
mask
masksToBounds
opacity
position
shadowColor
shadowOffset
shadowOpacity
shadowRadius
 
animationWithKeyPath types