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"];

posted on 2015-05-01 11:20  童话DY  阅读(497)  评论(0编辑  收藏  举报