标签:style blog color io 使用 ar for div cti
代码:
1 CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"transform.scale"]; 2 [animation setDuration:.6]; 3 NSMutableArray *values = [NSMutableArray array]; 4 [values addObject:[NSNumber numberWithFloat:1.0]]; 5 [values addObject:[NSNumber numberWithFloat:1.2]]; 6 [values addObject:[NSNumber numberWithFloat:1.0]]; 7 [values addObject:[NSNumber numberWithFloat:1.1]]; 8 [values addObject:[NSNumber numberWithFloat:1.0]]; 9 [animation setValues:values]; 10 [animation setRemovedOnCompletion:YES]; 11 [animation setAutoreverses:NO]; 12 animation.timingFunction =[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 13 [_animationView.layer addAnimation:animation forKey:@"transform.scale"];
使用CAKeyframeAnimation实现动画
其中_animationView就是要实现动画view
标签:style blog color io 使用 ar for div cti
原文地址:http://www.cnblogs.com/huangzizhu/p/3961932.html