Closed ChenyaZhang closed 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++; }
Use a real movie format instead of animated GIF.
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++; }