mayoff / uiimage-from-animated-gif

A UIImage category that loads animated GIFs
Creative Commons Zero v1.0 Universal
877 stars 164 forks source link

Any way to load faster? #20

Closed ChenyaZhang closed 7 years ago

ChenyaZhang commented 7 years ago

I put it into a background thread, still not fast enough. Any suggestions?

int i = 0; for (UIImageView *imageView in self.featuredPhotoImageViewCollection) { dispatch_async(dispatch_queue_create("imageQueue", NULL), ^{ NSURL *url = [NSURL URLWithString:[featuredPhotos[i] valueForKey:@"url"]]; UIImage *image = [UIImage animatedImageWithAnimatedGIFURL:url]; dispatch_async(dispatch_get_main_queue(), ^{ imageView.image = image; }); }); i++; }

mayoff commented 7 years ago

Use a real movie format instead of animated GIF.