Start a Project

How to display GIF image in ios

Display GIF Image

Some Times we require to display Gif images in ios so if we display using UIImageView then it will display as a constant image ,no movement in the image.

I have used in UIalertController to make attractive .

1: Save the Image as .gif extension in any places in computer directory.

2: Go to That Url “http://ezgif.com/split” and upload Gif image . so it will Split image into the number of Frames and download it.

3: Make a folder and store all images in that folder and drag to your project directory.

Note: images save  in folder in like 1.gif,2.gif… so please named as regular number so that you can easily store in NSArray .

4: write that code:

5 : Here (1.gif,2.gif are split images of actual gif image.)

6: Now write that static method in the Global class and call like this.

UIWindow  * currentWindow = [UIApplication sharedApplication].keyWindow;

[GlobalData alertController:currentWindow msg:@”Please Wait….”];

here GlobalData is global class .

Remove Or dismiss

[[currentWindow viewWithTag:121212] removeFromSuperview];

7: Happy coding………………

 

 

Exit mobile version