How to work with the CABasicAnimations
I am very new to the Animations, I need a CABasicAnimation that how to implement for an image to move it to bottom left to upper right. I tried with different examples but I am not succeeded. Alos I not using a Interface Builder I am using a viewcontroller to implement this. Please help me.
Thanks in开发者_如何学运维 Advance, Sekhar.
Should be something like this:
CABasicAnimation* anim = [CABasicAnimation animation];
anim.fromValue = [NSValue valueWithCGPoint:CGPointMake(0,460)]; //Start position
anim.toValue = [NSValue valueWithCGPoint:CGPointMake(320,0)]; //End Position
anim.duration = 1.0;
[vourImageView.layer addAnimation:anim forKey:@"MoveToUpperRight"];
Coded in browser, no guarantee for syntax.
See Core Animation Programming Guide Chapter Explicit Animations
精彩评论