Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Animation groups #275

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

naftaly
Copy link

@naftaly naftaly commented Sep 18, 2015

Simple implementation of animation groups.

Use it as follows:

CALayer *layer = [CALayer layer];
POPGroupAnimation *group = [POPGroupAnimation animation];

POPBasicAnimation* anim1 = [POPBasicAnimation animationWithPropertyNamed:kPOPLayerBorderWidth];
anim1.toValue = @(5);
anim1.duration = 5;

POPBasicAnimation* anim2 = [POPBasicAnimation animationWithPropertyNamed:kPOPLayerCornerRadius];
anim2.toValue = @(20.0);
anim2.duration = 2;

group.animations = @[ anim1, anim2 ];

[layer pop_addAnimation:group forKey:@"group"];

Animations will run following the rules of the group ( pause, repeat, etc, ... ). Blocks and delegates will continue to function as they always have for the animations that are part of the group as well as the animation group.

The animation group completes only after all it's child animations are completed.

@naftaly
Copy link
Author

naftaly commented Sep 18, 2015

possible implementation of #215

@naftaly naftaly mentioned this pull request Sep 21, 2015
@mbrgm
Copy link

mbrgm commented Dec 13, 2015

Is this going to be merged?

@danielreiser
Copy link

+1

4 similar comments
@ghost
Copy link

ghost commented Mar 14, 2016

+1

@bornbnid
Copy link

+1

@leotumwattana
Copy link

+1

@SaifAlDilaimi
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants