是否可以使用CAAnimation实现图像序列的动画?我也不想用UIImageView...
我需要一些类似于UIImageView的东西,在那里我们可以设置imageView.animationImages和调用startAnimation...但是使用CAAnimation
发布于 2011-05-09 20:04:24
CAKeyframeAnimation *animationSequence = [CAKeyframeAnimation animationWithKeyPath: @"contents"];
animationSequence.calculationMode = kCAAnimationLinear;
animationSequence.autoreverses = YES;
animationSequence.duration = kDefaultAnimationDuration;
animationSequence.repeatCount = HUGE_VALF;
NSMutableArray *animationSequenceArray = [[NSMutableArray alloc] init];
for (UIImage *image in self.animationImages)
{
[animationSequenceArray addObject:(id)image.CGImage];
}
animationSequence.values = animationSequenceArray;
[animationSequenceArray release];
[self.layer addAnimation:animationSequence forKey:@"contents"];https://stackoverflow.com/questions/5897759
复制相似问题