Questions tagged [cakeyframeanimation]

Describes an animation that provides keyframe interpolation of a layer property in Apple's Core Animation framework.

CAKeyframeAnimation is a Core Animation animation type that provides keyframe interpolation of a layer property. Instances should be created with the initializer animationWithKeyPath:.

For more information, see the Apple Documentation for CAKeyframeAnimation.

235 questions
8
votes
2 answers

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; …
openfrog
  • 40,201
  • 65
  • 225
  • 373
7
votes
1 answer

How to Animate CoreGraphics Drawing of Shape Using CAKeyframeAnimation

I am trying to animate the drawing of a UIBeizerPath (in my example a triangle) in a UIView subclass. However, the entire subview is animating instead of the shape. Is there something I am missing with the animation? - (void)drawRect:(CGRect)rect…
7
votes
2 answers

iOS UIBezierAnimation curves, howto to create some sort of arc?

I'm pretty sure this is a rather simple and straightforward question for anyone that has ever tried this before , but i'm kind of a newbie to what you would call "advanced" animation. I'm trying to create the following movement of an object by using…
7
votes
1 answer

CAKeyFrameAnimation not Linear for values greater than PI

I am having some trouble to understand why an animation isn't working like expected. What I am doing is this: Create a UIBezierPath with an arc to move a Label along this path and animate the paths stroke. //Start Point is -.pi /2 to let the Arc…
7
votes
3 answers

CAKeyFrameAnimation delays before repeating

I have an ball image that I'm animating around a path. The animation is set to repeat forever, but why is there a delay between repeats? Here's my code: CGPathRef aPath; aPath = CGPathCreateWithEllipseInRect(CGRectMake(0, 0, SIZE, SIZE),…
Kelly Bennett
  • 725
  • 5
  • 27
6
votes
3 answers

iOS CAKeyFrameAnimation Scaling Flickers at animation end

In another test of Key Frame animation I am combining moving a UIImageView (called theImage) along a bezier path and scaling larger it as it moves, resulting in a 2x larger image at the end of the path. My initial code to do this has these elements…
Peter M
  • 7,309
  • 3
  • 50
  • 91
6
votes
2 answers

CAKeyframeAnimation Manual Progress

I have a UIView whose backing layer has a CAKeyframeAnimation with a simple straight line path set as its `path`. Can I have the animation "frozen", so to speak, and manually change its progress? For example: If the path is 100 points in length,…
caughtinflux
  • 101
  • 1
  • 6
6
votes
1 answer

How to call scrollViewDidScroll: the same way UIScrollView does, but during custom animation?

I have a very large horizontally scrolling UIScrollView which is reusing its subviews (moves and updates them when they are out of visible area, similar like UITableView is reusing cells). This relies on scrollViewDidScroll: delegate call, which…
5
votes
4 answers

Removing CAKeyframeAnimation doesn't release the memory

I'm adding a CAKeyframeAnimation to the layer of an ImageView for representing the animation of an image: CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"contents"]; animation.values = arrayOfImages; [animation…
nano
  • 2,511
  • 4
  • 25
  • 42
5
votes
2 answers

Reverse the rotation of UIImageView using CAKeyframeAnimation

I'm using the following code to rotate an image infinitely, the rotation is clockwise but I also need it to reverse rotation to counter clockwise every 1-2 rotations and then back to clockwise, how to get this to work? /// Image Rotation -…
Jessica Kimble
  • 493
  • 2
  • 7
  • 17
5
votes
2 answers

Set Start Point for CGAffineTransform

I am animating a UIView along a circle using a CAKeyframeAnimation that follows a CGPathAddEllipseInRect. However, the view always seems to start in the same place regardless of the frame it is originally positioned in. Is there some way to adjust…
individualtermite
  • 3,615
  • 16
  • 49
  • 78
5
votes
2 answers

Rotate image with animation and read rotation afterwards

I'm implementing a wheel of fortune with a CAKeyframeAnimation and try to read the result after the animation has stopped. But here I do not get deterministic results. Is it not possible to read the rotation after the animation has stopped? Here my…
netshark1000
  • 7,245
  • 9
  • 59
  • 116
5
votes
1 answer

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,…
user346443
  • 4,672
  • 15
  • 57
  • 80
5
votes
4 answers

CAKeyframeAnimation : contents change back to first image when stopped

I animate the content of a CALayer using the following code: CAKeyframeAnimation *countanimation = [CAKeyframeAnimation animation]; NSArray *images = [NSArray arrayWithObjects:(id)[UIImage imageNamed:@"number3"].CGImage, …
Jun
  • 3,422
  • 3
  • 28
  • 58
4
votes
1 answer

Positioning a UIView after CAKeyframeAnimation results in display glitch

I'm having this problem with a CAKeyframeAnimation. After animating the layer of a UIView, i'd like to position the UIView to the position I'm animating to so that the user can continue using the buttons on this UIView. I'm currently using this…
polyclick
  • 2,704
  • 4
  • 32
  • 58
1
2
3
15 16