ios - 使用CAKeyframeAnimation,push一个新的VC之后,pop返回时,动画停止了?
伊谢尔伦
伊谢尔伦 2017-04-18 09:49:13
0
1
456

使用CAKeyframeAnimation添加在当前VC的一个ImageView上,push一个新的VC之后,pop返回时动画停止了,repeatCount设置为CGFLOAT_MAX,有什么办法可以让动画不停止吗?

CAKeyframeAnimation *cka = [CAKeyframeAnimationanimationWithKeyPath:@"transform.scale"];

cka.values =   @[@0.7, @1.5, @1,   @1];
cka.keyTimes = @[@0.0, @0.3,  @0.3, @1];
cka.repeatCount = CGFLOAT_MAX;
cka.duration = 1.8;
[_pointView.layer addAnimation:cka forKey:@"cka"];
伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
PHPzhong

You can set the removedOnCompletion attribute to NO to allow VC to switch without stopping the animation.

cka.removedOnCompletion = NO;
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template