cakeyframeanimation

What explains best the CAPropertyAnimation animationWithKeyPath: parameter?

I'd like to have a better understanding of this parameter in + (id)animationWithKeyPath:(NSString *)keyPath They just say: "The key path of the property to be animated." In some example snippets I see things like: CABasicAnimation *fadeInAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"]; CAKeyframeAnimation *animatedI...

Why does this CAKeyFrameAnimation stop with zero opacity?

I have this code. At the end of the values array, you can see I provide 0.5 for the opacity. But for some reason, when the animation stops, it flashes once again and then leaves the view completely transparent. What's wrong there? CALayer *layer = self.layer; CAKeyframeAnimation *blinkAnim = [CAKeyframeAnimation animationWithKeyPath:@...

How to let a CAKeyframeAnimation pick up the current state when overriding another?

I have one like this: CALayer *layer = stripeButton.layer; CAKeyframeAnimation *moveAnim = [CAKeyframeAnimation animationWithKeyPath:@"bounds.origin.y"]; moveAnim.duration = 3.35; moveAnim.repeatCount = 0; moveAnim.autoreverses = NO; moveAnim.removedOnCompletion = NO; moveAnim.calculationMode = kCAAnimationLinear; moveAnim.fillMode = kC...

How do I check whether a CAKeyframeAnimation has already cleared a keyframe or not?

Greetings, Let's say, for the sake of simplicity, that I'm animating the position of a UIView using a CAKeyframeAnimation employing a path containing three keyframes, let's call them A, B, an C. At a random time during the animation I want to check whether the animation has already passed the B keyframe. How do I do that? ...

How Do You CAKeyframeAnimation Scale?

Hi, I want to create an animation with several key frames. I want my Layer (a button in this case) to scale up to 1.5 then down to 0.5 then up to 1.2 then down to 0.8 then 1.0. I also want to EaseIn and EaseOut of each keyframe. As you can imagine, this will create a Springy/Bounce effect on the spot. In other parts of my app I have ...

Why does my CAKeyframeAnimation not get executed?

This' my code in which I'm trying to change the size of my imageView. If you can point out any error, I'll be really grateful.. UIImageView *imageViewForAnimation = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ravan.jpg"]]; imageViewForAnimation.alpha = 1.0f; CGSize size1=CGSizeMake(60,60); CGSize size2=CGSiz...

Why are my animation values ignored?

I try to do a CAKeyFrameAnimation for rotating an layer: CALayer* theLayer = myView.layer; CAKeyframeAnimation* animation; animation = [CAKeyframeAnimation animationWithKeyPath:@"transform.rotation.z"]; animation.duration = 1.0; animation.cumulative = NO; animation.repeatCount = 1; animation.removedOnCompletion ...

What kind of value is keyTime in an CAKeyFrameAnimation?

For example I have this CAKeyFrameAnimation: CALayer* theLayer = myView.layer; CAKeyframeAnimation* animation; animation = [CAKeyframeAnimation animationWithKeyPath:@"transform.rotation.z"]; animation.duration = 1.6; //animation.cumulative = YES; animation.repeatCount = 1; animation.removedOnCompletion = NO; ...

How to keep on rotating a view with a CAKeyFrameAnimation?

I try to do this: There is an view which has been rotated already to some value, lets say 15 degrees. Imagine a view rotated by 15 degrees. Next, I only know, that I want this view to rotate from it's current rotation to 40 degrees. Imagine how that view now rotates from 15 to 40 degrees. For practice, I want to do that with CAKeyFr...

Implementing a CAKeyFrameAnimation callback in MonoTouch at the end of an animation set?

My code works and I animate, but I'm not sure how to do this: http://stackoverflow.com/questions/296967/animation-end-callback-for-calayer ...in MonoTouch. Here's what i've got: public partial class MyCustomView: UIView { // Code Code Code private void RunAnimation() { CAKeyFrameAnimation pathAnimation =...

CAKeyframeAnimation with loop

I'm trying to create a CAKeyframeAnimation with a little twist. I want part of the keyframe animation to loop for a while before going straight to the end. For example: Intro: play keyframes 0 to 10 Loop: play keyframes 11 to 15 (repeat for a while) End: play keyframes 16 to 20 CAKeyframeAnimation doesn't seem to provide enough f...

Intermittent fillMode=kCAFillModeForwards bug using CAKeyframeAnimation with path

I'm having an intermittent problem when I move a UIImageView around the screen using CAKeyframeAnimation. I want the position of the UIImageView to remain where the animation ends when it is done. This bug only happens for certain start and end points. When I use random points it works correctly most of the time, but about 5-15% of the t...

How to specify selector when CAKeyframeAnimation is finished?

I'm using a CAKeyframeAnimation to animate a view along a CGPath. When the animation is done, I'd like to be able to call some other method to perform another action. Is there a good way to do this? I've looked at using UIView's setAnimationDidStopSelector:, however from the docs this looks like it only applies when used within a UIView...

Why CAAnimation Rotation is returning to previous state

I am using CAKeyFrameAnimation to do rotation of an arrow image. Problem is that the imageview is returning back to the previos state after animation. Code: CAKeyframeAnimation *rotation = [CAKeyframeAnimation animation]; rotation.duration = 0.55; rotation.cumulative = TRUE; rotation.removedOnCompletion = NO; if (isFlipRight) ...

moving series of objects on the ellipse path in iphone sdk

hello i have series of balls (12 balls) and i want to move them on the ellipse path when i touch them view layer and move to right or to left. i tried to use CAKeyframeAnimation class with single object of them. this object moves correctly in the ellipse path (i used CGPathAddCurveToPoint to define the path), but this object moves in t...

iPhone - How to make a circle path for a CAKeyframeAnimation?

I'm trying to make an key frame animation that lets a image view fly around a circle. I'm using CGPathAddCurveToPoint to make the key frame points. The problem is that the image view always uses the shortest (linear) route. I would like to have some kind of function that builds a circle path for a given radius. Thanks a lot for any hel...

CAKeyframeAnimation

Hi i'm creating a Keyframe animation from multiple images. My problem is i would like the animation to instantly change from one image to the next rather than a fade. CALayer *animLayer = [CALayer layer]; animLayer.bounds = CGRectMake(0, 0, width, height); animLayer.position = CGPointMake(0, 0); CAKeyframeAnimation *cus...