我创建了一个动画图像,它在 UIImageView 中正确动画:
- (void)viewDidLoad
{
[super viewDidLoad];
UIImage *image1 = [UIImage imageNamed:@"apress_logo"];
UIImage *image2 = [UIImage imageNamed:@"Icon"];
UIImage *animationImage = [UIImage animatedImageWithImages:[NSArray arrayWithObjects:image1, image2, nil] duration:0.5];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
imageView.image = animationImage;
[self.view addSubview:imageView];
}
但如果保存到相册,它就不能为 agian 设置动画:
UIImageWriteToSavedPhotosAlbum(animationImage,
self,
@selector(imageSavedToPhotosAlbum:didFinishSavingWithError:contextInfo:),
nil);
那么有什么解决方案可以将动画图像保存到相册吗?
特别感谢!