fhefh2015
5/23/2016 - 3:04 AM

CABasicAnimation动画

CABasicAnimation动画

- (void)animationBaseTest {
    
    CABasicAnimation *baseAnimate = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
    baseAnimate.toValue = @(0);
    baseAnimate.duration = 0.8;
    baseAnimate.repeatCount = MAXFLOAT;
    baseAnimate.autoreverses = YES;
    
    [self.heart.layer addAnimation:baseAnimate forKey:@"scaleAnimate"];
    
}