1

How to load animated GIF image as UIImage from *.imageset folder with different resolutions, without any additional pods?

If i put my GIF images in *.imageset folder they correctly display in XCode http://take.ms/7fsCp, but when i try to load it with UIImage, it returns nil

UIImage *image = [UIImage imageNamed: @"help_image"];

How to make it works?

wtorsi
  • 692
  • 2
  • 8
  • 27

2 Answers2

1

You can use SDWebImage to do that.

#import "UIImage+GIF.h"

self.imageViewGif.image= [UIImage sd_animatedGIFNamed:@"help_image"];

I hope this can help you.

J. Lopes
  • 1,336
  • 16
  • 27
  • I've already read this article before question, and thought about easier solution, without additional frameworks. Now use SD. Thank you – wtorsi Jun 01 '16 at 13:09
0

Add animated Gif image in Iphone UIImageView

check this link you will get your answer Using UIImage category you can get the exect output.

Community
  • 1
  • 1
JP_Mob
  • 114
  • 7