vendredi 29 juillet 2016

How to implement the following animation?

I want to ask how to implement the following number animation?I hope you can help me, thank you!

enter image description here

can use facebook pop to achieve it?

POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPLayerBounds];
springAnimation.springSpeed         = 0;
springAnimation.springBounciness    = 20;
if (self.testView.frame.size.width == 100) {
    springAnimation.toValue = [NSValue valueWithCGRect:CGRectMake(0, 0, 50, 50)];
} else {
    springAnimation.toValue = [NSValue valueWithCGRect:CGRectMake(0, 0, 100, 100)];
}
[self.testView.layer pop_addAnimation:springAnimation forKey:nil];

Aucun commentaire:

Enregistrer un commentaire