美文网首页iOS
将 image 图片数组生成 gif 格式图片 - iOS

将 image 图片数组生成 gif 格式图片 - iOS

作者: survivorsfyh | 来源:发表于2017-09-18 16:31 被阅读29次

- (void)createGif {

UIImageView* animatedImageView = [[UIImageView alloc] initWithFrame:CGRectMake(50,80, 550/2, 200)];      

animatedImageView.animationImages =@[[UIImage imageNamed:@"image0"],

[UIImage imageNamed:@"image1"],

[UIImage imageNamed:@"image2"]];

animatedImageView.animationDuration = 1.0f;

animatedImageView.animationRepeatCount = 0;

[self.view addSubview: animatedImageView];

[animatedImageView startAnimating];

}

相关文章

网友评论

    本文标题:将 image 图片数组生成 gif 格式图片 - iOS

    本文链接:https://www.haomeiwen.com/subject/cvybsxtx.html