[ios]代码库
// 读取本地gif图片
NSURL* firstUrl = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"apple_logo_animated" ofType:@"gif"]];
UIImageView * firstAnimation = [AnimatedGif getAnimationForGifAtUrl: firstUrl];
// 读取网络中的gif图片
NSURL * secondUrl = [NSURL URLWithString:@"http://www.gifs.net/Animation11/Food_and_Drinks/Fruits/Apple_jumps.gif"];
UIImageView * secondAnimation = [AnimatedGif getAnimationForGifAtUrl: secondUrl];
// Add them to the view.
[theFirstAnimatedGif addSubview:firstAnimation];
[theSecondAnimatedGif addSubview:secondAnimation];
by: 发表于:2017-10-25 10:45:48 顶(0) | 踩(1) 回复
??
回复评论