通过提取 .gif 图像,我得到了分辨率为(1024*768)的48个帧。我将这些帧存储在一个数组中,就像这样。
NSMutableArray *splashImages = [[NSMutableArray alloc] init];
for(int i=1;i <= 48;i ++)
{
[splashImages addObject:[UIImage imageNamed:[NSString stringWithFormat:@"img%d.jpg",i]]];
}
[ImageView setAnimationImages:splashImages];
[ImageView setAnimationDuration:1.0];
[ImageView startAnimating];
我用了1秒的时间将这个动画效果给UIImageView,但是在运行应用程序时,它的动画效果不够平滑,甚至还会卡顿。
有什么解决方案吗?