iOS:fix iOS 14 cannot display image
This commit is contained in:
parent
b9b0ce22b2
commit
171e96d0b5
@ -30,6 +30,17 @@ @interface DoricImageView : YYAnimatedImageView
|
||||
@end
|
||||
|
||||
@implementation DoricImageView
|
||||
- (void)displayLayer:(CALayer *)layer {
|
||||
if (@available(iOS 14.0, *)) {
|
||||
if (self.isAnimating) {
|
||||
[super displayLayer:layer];
|
||||
} else {
|
||||
layer.contents = (__bridge id) self.image.CGImage;
|
||||
};
|
||||
} else {
|
||||
[super displayLayer:layer];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
@interface DoricImageNode ()
|
||||
|
Reference in New Issue
Block a user