Apple如何在短信中完成动画GIF?

时间:2012-11-06 19:54:08

标签: ios

我刚刚了解到,自iOS 5.0起,您可以在短信中发送动画GIF。

有没有人知道Apple如何实现它,因为UIImage和UIImageView不提供处理动画GIF的开箱即用解决方案?

1 个答案:

答案 0 :(得分:0)

动画UIImageView?

self.imgview_animation.animationImages = [NSArray arrayWithObjects:
                                              [UIImage imageNamed:@"animation_1.jpg"],
                                              [UIImage imageNamed:@"animation_2.jpg"],
                                              [UIImage imageNamed:@"animation_3.jpg"],
                                              [UIImage imageNamed:@"animation_4.jpg"],
                                              [UIImage imageNamed:@"animation_5.jpg"],
                                              [UIImage imageNamed:@"animation_6.jpg"],
                                              [UIImage imageNamed:@"animation_7.jpg"],
                                              [UIImage imageNamed:@"animation_8.jpg"],
                                              [UIImage imageNamed:@"animation_9.jpg"],
                                              [UIImage imageNamed:@"animation_10.jpg"],nil];

self.imgview_animation.animationDuration = 4; // seconds
self.imgview_animation.animationRepeatCount = 1; // 0 = loops forever
[self.imgview_animation startAnimating];