jjzjj

sunImageView

全部标签

ios - 使用 CAKeyframeAnimation 沿 UIBezierPath 移动 UIImageView 不执行任何操作

我正在尝试通过在此函数中使用CAKeyframeAnimation沿UIBezierPath移动UIImageView。目前它根本不动。我知道路径创建是正确的,因为我正在绘制它以进行检查,它是我想要的形状的漂亮弧线。代码:funcanimateSun(){letsunImageView=UIImageView(image:UIImage(named:"Sun"))sunImageView.sizeToFit()letsunAnimationPath=UIBezierPath()letpathStart=CGPoint(x:(sunImageView.frame.width/2),y:s