小编Sun*_*eha的帖子

如何在iOS中分享gif动画图像

我不知道如何使用UIActivityViewController分享动画.gif图像.请帮我解决这个问题.谢谢提前

see this image .i am displaying this type of images and to share these images I am using uiactivity view but it is not animating .it's just displaying image 



if(imgFrameCount==1)

    {
        imgFrameCount++;
        NSURL *url1=[[NSBundle mainBundle]URLForResource:@"animated2" withExtension:@"gif"];
        self.firstImage=[UIImage animatedImageWithAnimatedGIFData:[NSData dataWithContentsOfURL:url1]];
        self.frameImage.image = self.firstImage;
    }
else if (imgFrameCount==2)
{
    imgFrameCount++;
    NSURL *url2=[[NSBundle mainBundle]URLForResource:@"animated3" withExtension:@"gif"];
    self.firstImage=[UIImage animatedImageWithAnimatedGIFData:[NSData dataWithContentsOfURL:url2]];
    self.frameImage.image = self.firstImage;
}
Run Code Online (Sandbox Code Playgroud)

ios

2
推荐指数
1
解决办法
2936
查看次数

标签 统计

ios ×1