CABasicAnimation animationWithKeyPath 的类型
[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 animationWithKeyPath types](http://www.adamzucchi.com/blog/wp-content/uploads/2010/01/Screen-shot-2010-01-25-at-1.33.58-PM.png)