We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDPhotoBrowserd在加载gif的时候会默认加载图片第一帧。满足不了项目需求。我这边做了一下小改进。大神有时间看下在SDImageView中- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder这里判断是否时gif NSString * urlStr = [NSString stringWithFormat:@"%@",url]; 在下载成功方法里判断gif if ([urlStr hasSuffix:@".gif"]) { dispatch_queue_t queue = dispatch_queue_create("testQueue", DISPATCH_QUEUE_CONCURRENT); dispatch_async(queue, ^{ NSData * imageData = [NSData dataWithContentsOfURL:url]; dispatch_async(dispatch_get_main_queue(), ^{ _scrollImageView.image = [UIImage sd_animatedGIFWithData:imageData]; [_scrollImageView setNeedsDisplay]; return; });
});
The text was updated successfully, but these errors were encountered:
No branches or pull requests
SDPhotoBrowserd在加载gif的时候会默认加载图片第一帧。满足不了项目需求。我这边做了一下小改进。大神有时间看下在SDImageView中- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder这里判断是否时gif
NSString * urlStr = [NSString stringWithFormat:@"%@",url];
在下载成功方法里判断gif
if ([urlStr hasSuffix:@".gif"]) {
dispatch_queue_t queue = dispatch_queue_create("testQueue", DISPATCH_QUEUE_CONCURRENT);
dispatch_async(queue, ^{
NSData * imageData = [NSData dataWithContentsOfURL:url];
dispatch_async(dispatch_get_main_queue(), ^{
_scrollImageView.image = [UIImage sd_animatedGIFWithData:imageData];
[_scrollImageView setNeedsDisplay];
return;
});
The text was updated successfully, but these errors were encountered: