我有一个imageUrl数组,我需要使用Fade Animation在无限的时间内在单个UIImageView
上显示该数组中的所有图像。如何实现呢?
目前我正在使用此代码,但仅应用一次动画:
CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"contents"];
//animation.calculationMode = kCAAnimationDiscrete;
animation.duration = 30.0;
animation.values = imageListArray;
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
animation.repeatCount = 0;
animation.removedOnCompletion = NO;
animation.autoreverses = true;
animation.fillMode = kCAFillModeForwards;
[_loyaltyImageView.layer addAnimation:animation forKey:@"animation"];