CABasicAnimation 缩放动画

   keyPath分为:transform.scale     transform.scale.x      transform.scale.y      transform.scale.z

   CABasicAnimation* scale = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
    scale.fromValue = [NSNumber numberWithFloat:1];
    scale.toValue   = [NSNumber numberWithFloat:2];
    scale.duration = 1;
    scale.autoreverses = YES;
    scale.repeatCount = 0;

    view.layer addAnimation:scale forKey:@"scale"];

原文地址:https://www.cnblogs.com/417460188dy/p/4470501.html