Questions tagged [caanimation]

CAAnimation is an abstract animation class from Apple QuartzCore framework. It provides the basic support for the CAMediaTiming and CAAction protocols.

All Core Animation's animation classes descend from the abstract class CAAnimation. CAAnimation adopts the CAMediaTiming protocol which provides the simple duration, speed, and repeat count for an animation. CAAnimation also adopts the CAAction protocol. This protocol provides a standardized means for starting an animation in response to an action triggered by a layer.

For more information, see the Apple Documentation for CAAnimation.

457 questions
5
votes
4 answers

How to remove a layer when its animation completes?

I am making an iOS App. I have several CALayer objects that eventually will be deleted by a (shrinking) animation. When the animation is completed, and animationDidStop:finished is invoked, I would like to remove the CALayer object from the super…
ragnarius
  • 5,018
  • 9
  • 42
  • 61
5
votes
2 answers

3D Animation - CABasicAnimation and CATransform3D giving gap between views

So,I am trying to implement an animation which is in this app http://itunes.apple.com/us/app/spg-mobile-app/id312306003?mt=8 which is in the first view I have implemented animation for flipping views and i am succeeded in animating one side and…
Charan
  • 4,930
  • 3
  • 24
  • 43
4
votes
1 answer

Is it possible to control a CAAnimation's timeline?

I have a complex animation that usually runs just by itself, driven by a certain CAMediaTimingFunction. This works fine. Now, I want to control that same animation's time(line) using an external value, for example from a slider or a gesture…
Martijn Thé
  • 4,544
  • 3
  • 26
  • 42
4
votes
2 answers

CALayer Positioning After Object Has Moved

I animate my UIImageView with CAAnimation using layer property like so: [imageView.layer addAnimation:pathAnimation forKey:[NSString stringWithFormat:@"pathAnimation%@",objId]]; But at the end of my animation (after object has moved from…
Vad
  • 3,418
  • 8
  • 40
  • 73
4
votes
1 answer

Use of unresolved identifier 'kCAFillModeForwards'

When I try to set animation.fillMode = kCAFillModeForwards Xcode can't compile and display an error. "Use of unresolved identifier 'kCAFillModeForwards'". I've already used this in previous projects without any issues, did somebody already…
Julien W.
  • 159
  • 1
  • 15
4
votes
1 answer

Add animation after removeAllAnimations doesn't work

I have simple application that is the red view transform position form left screen to right screen. I want when I hit remove button, the animation will be restart (the red view transform position form left screen to right screen again) but it…
Tung Vu Duc
  • 1,204
  • 1
  • 11
  • 20
4
votes
2 answers

iPhone: Synchronize animations on two different layers

I need to synchronize a path animation on two different layers (one is used as a mask for another layer, the other shows a graphical element that follows the path, i.e. draws the mask). If I just set them up identically, they never quite do the same…
Joseph Tura
  • 6,046
  • 6
  • 41
  • 70
4
votes
1 answer

Animation Delegate not converting to Swift 3.0

I want to implement CABasicAnimation and have the UIViewController notified when the animation is completed. From this resource: http://www.informit.com/articles/article.aspx?p=1168314&seqNum=2 I understood that I can specify the viewcontroller as a…
user594883
  • 1,261
  • 2
  • 14
  • 34
4
votes
2 answers

How to change Frame.size using CABasicAnimation

Hi i have change the frame size using CABasicAnimation i used below code CABasicAnimation *newanim; newanim = [CABasicAnimation animationWithKeyPath:@"bounds.size"]; newanim.duration=3.0; newanim.fromValue=[NSValue…
jeeva
4
votes
3 answers

UIBezierPath + CAShapeLayer - animate a circle filling up

I am trying to animate the paths of a CAShapeLayer so that I get the effect of a circle "filling" up to a specific amount. The Issue It "works", but is not AS smooth as I think it could be, and I want to introduce some easing to it. But because I'm…
Alex
  • 5,210
  • 3
  • 27
  • 32
4
votes
1 answer

UIImageView is disappearing after CAKeyframeAnimation

I'm trying this code (found in an answer here on SO) in a category on UIView and am using it to peform a "pop" animation on a UIImageView nested inside of a UITableViewCell. - (void)attachPopUpAnimation { CAKeyframeAnimation *animation =…
Mark Adams
  • 30,342
  • 11
  • 73
  • 77
4
votes
2 answers

Convert/Wrap Swift struct as NSValue for CAAnimation purposes?

I have a custom CALayer subclass that draws a circular arc. It looks something like: class ArcLayer: CALayer { var strokeColor:UIColor = UIColor.blackColor() { didSet { self.setNeedsDisplay() }} var strokeWidth:CGFloat = 1.0 { didSet {…
Travis Griggs
  • 18,930
  • 17
  • 76
  • 137
4
votes
1 answer

When a CAAnimation is autoreversed is the timingFunction reversed too?

An example: The following will ease-in the alpha from 0 to 1. When it reverses will it ease-in from 1 to 0, or will it reverse the timing function, and essentially use ease-out? CABasicAnimation *animation = [CABasicAnimation…
Warpling
  • 1,747
  • 2
  • 19
  • 32
4
votes
2 answers

Changing UIView background color using an animation

I want to change my UIView background color with a transition animation. For example, if the view is red and I change it to blue. The blue color will slide up from the bottom of the screen to the top and fill the whole screen. I was thinking of…
Kex
  • 6,762
  • 5
  • 39
  • 93
4
votes
0 answers

app crashing because of animationDidStart selector is sent to objects that don't support it

In my app i'm starting to see a new type of crash resulting from animationDidStart selector being sent to objects that don't support it like UIScrollViewDelayedTouchesBeganGestureRecognizer and UIImageView. i started getting them on my new iphone 5s…
Boaz Saragossi
  • 908
  • 10
  • 30