草庐IT

positionAnimation

全部标签

swift - 键路径为 "bounds"的 CABasicAnimation 不工作

我有以下代码使用CABasicAnimation对CALayer的边界属性进行动画处理。但是代码似乎不起作用。letfromValue=textLabel.layer.boundslettoValue=CGRectMake(textLabel.layer.bounds.origin.x,textLabel.layer.bounds.origin.y,textLabel.layer.bounds.width,textLabel.layer.bounds.height+50)letpositionAnimation=CABasicAnimation(keyPath:"bounds")pos