I am trying to create an important frame animation that allows an image view to fly around a circle. The problem I am using CGPathAddCurveToPoint
to make key frame points is that the image view always uses at least (linear) paths.
I have to do something which makes a divisional path for a given radius.
Thanks a lot for any help.
CGMTablePathRaf = CGPCreatmentTable (); CGPathMoveToPoint (path, NULL, startPoint.x, startPoint.y); CGPathAddQuadCurveToPoint (path, NULL, middlePoint.x, middlePoint.y, endPoint.x, endPoint.y); CAKeyframeAnimation * pathAnimation = [CAKeyframeAnimation with animation: @ "status"]; PathAnimation.removedOnCompletion = NO; PathAnimation.path = Path; [PathAnimation SetModule: CAAA Animation Cubic]; [Route Animation SetfillModa: KCFilmodayForward]; PathAnimation.duration = 2.0; [ViewTobemoved.layer addAnimation: pathAnimation forKey: zero];
This animation uses only one bezier point and creates a soft circle from starting point to end point. If you want to define the curve, you can also define the radius of the work. The following link
Comments
Post a Comment