CGPathAddEllipseInRect 다음에 오는 CAKeyframeAnimation을 사용하여 원을 따라 UIView에 애니메이션을 적용하고 있습니다. 그러나보기는 항상 원래 있던 프레임에 관계없이 같은 위치에서 시작하는 것처럼 보입니다. 경로에서보기의 시작 위치를 조정할 수있는 방법이 있습니까?CGAffineTransform에 대한 시작점 설정
감사합니다.
CAKeyframeAnimation *myAnimation = [CAKeyframeAnimation animationWithKeyPath:@"position"];
myAnimation.fillMode = kCAFillModeForwards;
myAnimation.repeatCount = 5;
myAnimation.calculationMode = kCAAnimationPaced;
myAnimation.duration = 10.0;
CGMutablePathRef animationPath = CGPathCreateMutable();
CGPathAddEllipseInRect(animationPath, NULL, rect);
myAnimation.path = animationPath;
CGPathRelease(animationPath);
[view.layer addAnimation:myAnimation forKey:@"changeViewLocation"];