Skip to content
New issue

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

点击图片放大,然后缩小时,页面上的图片都没有了 (ios13) #76

Open
jinshuaier opened this issue Dec 2, 2019 · 1 comment

Comments

@jinshuaier
Copy link

No description provided.

@Jake-Chiu
Copy link

LWAsyncImageView.m
更改如下

  • (UIImage )image {
    UIImage
    image = nil;

    if (self.gifImage) {
    //如果是gif动画,这里从去当前帧的UIImage对象,当displayLink计时器触发时,会调用
    //“- (void)displayLayer:(CALayer *)layer ”方法。通过设置Layer的contents完成动画的播放
    image = self.gifCurrentFrame;
    }
    // else {
    // CGImageRef imageRef = (__bridge CGImageRef)(self.layer.contents);
    // image = [UIImage imageWithCGImage:imageRef];
    // }
    return image;
    }

//- (void)setImage:(UIImage *)image {
// //清除image
//
// if (!image) {
// if (self.image) {
// CGImageRef imageRef = (__bridge_retained CGImageRef)(self.layer.contents);
// id contents = self.layer.contents;
// self.layer.contents = nil;
// if (imageRef) {
// dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
// [contents class];
// CFRelease(imageRef);
// });
// }
// }
//
// } else {
// if (self.displayAsynchronously) {
// [self.layer.lw_asyncTransaction addAsyncOperationWithTarget:self.layer
// selector:@selector(setContents:)
// object:(__bridge id _Nullable)image.CGImage
// completion:nil];
// }
// else {
// [self.layer setContents:(__bridge id _Nullable)image.CGImage];
// }
// }
//
//
//
//}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants