Estoy animando una UIView en un círculo utilizando una CAKeyframeAnimation que sigue a CGPathAddEllipseInRect. Sin embargo, la vista siempre parece comenzar en el mismo lugar, independientemente del marco en el que se encuentra originalmente. ¿Hay alguna forma de ajustar la posición de inicio de la vista en la ruta?Establecer punto de inicio para CGAffineTransform
Gracias!
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"];