【发布时间】:2012-08-28 18:48:28
【问题描述】:
我正在谷歌搜索过去几个小时的答案。我知道 Apple 和 Facebook 不支持 gif 图像,我想在 iPhone 应用程序中显示和创建 gif 图像,我找到了制作图像序列并提供动画的替代解决方案。我想从这些图像中创建 GIF 图像并发布到 Facebook 墙上。
当我在谷歌上搜索 Facebook 和 Apple 时,它会显示 2 年前的答案。可能现在苹果和Facebook改变了他们的政策,是否可以在iPhone App上创建GIF图像并发布到Facebook上?
根据这个堆栈溢出问题here Apple 是否支持 gif 图片?
UIImageView* animatedImageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
animatedImageView.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"image1.gif"],
[UIImage imageNamed:@"image2.gif"],
[UIImage imageNamed:@"image3.gif"],
[UIImage imageNamed:@"image4.gif"], nil];
animatedImageView.animationDuration = 1.0f;
animatedImageView.animationRepeatCount = 0;
[animatedImageView startAnimating];
[self.view addSubview: animatedImageView];
【问题讨论】:
-
我想这是可能的,因为Gif Shop、Giffer! 和GifBoom 已经做到了。请查看this SO question 以获得提示。
-
@jurgemaister。谢谢你的例子