Fixed an issue where playing an animated photo with YYWebImage could not stay on the last frame.
This commit is contained in:
parent
44135ebf26
commit
4e2b4d051b
@ -37,11 +37,12 @@ @interface DoricImageView : YYAnimatedImageView
|
||||
@implementation DoricImageView
|
||||
- (void)displayLayer:(CALayer *)layer {
|
||||
if (@available(iOS 14.0, *)) {
|
||||
if (self.isAnimating) {
|
||||
if ([self.image isKindOfClass:YYImage.class]
|
||||
&& ((YYImage *) self.image).animatedImageData) {
|
||||
[super displayLayer:layer];
|
||||
} else {
|
||||
layer.contents = (__bridge id) self.image.CGImage;
|
||||
};
|
||||
}
|
||||
} else {
|
||||
[super displayLayer:layer];
|
||||
}
|
||||
|
Reference in New Issue
Block a user