[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
 
CABasicAnimation animationWithKeyPath 的类型

相关文章:

  • 2021-08-06
  • 2021-11-18
  • 2021-11-28
  • 2021-08-02
  • 2022-02-21
  • 2021-09-19
  • 2022-12-23
猜你喜欢
  • 2021-11-06
  • 2021-09-13
  • 2022-12-23
  • 2021-11-24
相关资源
相似解决方案