Advertise with us

.gif files not reflecting delay changes in xcode project

Posted by  lois waisbrooker
 1789  View(s)
Rate this:
Hi Expert,

I am using .gif files in my xcode project. I have replaced my gif with different time delays between frames. But it does not reflect the changes. The changes between frames have been done in gif itself. the preview of that .gif file shows the changes but on the simulator it does not reflect the same delay! 

Please help.
Thanks in advance. 

  1. Re: .gif files not reflecting delay changes in xcode project

    Hi Lois,

    I can provide you with a simpler solution, you can inherit this library and then you simply have to add a single method that is

    NSURL *url = [[NSBundle mainBundle] URLForResource:@"JuU08" withExtension:@"gif"];
    [SharedImageButton setImageWithURL:[ImageArray objectAtIndex:indexPath.row] placeholderImage:[UIImage animatedImageWithAnimatedGIFData:[NSData dataWithContentsOfURL:url]]];
    Where JuU08 is the name of the gif image that you have added to your project. Here I have added the image to a UIButton in a UITableView.

    Link :-

    Instead of adding multiple frames with time delays which can become tiring . 

    Hope this helps you.

      Modified On Mar-30-2018 01:37:17 AM