PINRemoteImage icon indicating copy to clipboard operation
PINRemoteImage copied to clipboard

PINAnimatedImageView not displaying an image in some scenarios

Open MikeMcNamara opened this issue 4 years ago • 1 comments

In a number of places where we set the image property in PINAnimatedImageView, no image is appearing. We have traced this back to the following line, where you clear the contents of the UIImageView's layer contents. When this line is commented, the images appear correctly.

We subclass PINAnimatedImageView and have managed to workaround this issue by calling [self.layer setNeedsDisplay] right after setting the image in this subclass. We do it in the image setter as follows:

- (void)setImage:(UIImage *)image {
    [super setImage:image];
    [self.layer setNeedsDisplay];
}

Setup:

PINRemoteImage 3.0.3 Xcode 12.2 All devices tested (both simulators and real devices)

Getting this issue addressed would be great if possible! Thanks 🙏

MikeMcNamara avatar Dec 03 '20 10:12 MikeMcNamara

Could it be related to #517? It seems like your workaround helps with it too.

alex-vasenin avatar Dec 20 '20 02:12 alex-vasenin