Fix the wrong code use super.respondsToSelector, should use the superClass.instancesRespondToSelector to check super class itself contains the implementation

This commit is contained in:
DreamPiggy 2020-07-01 19:33:19 +08:00
parent 033bb5321f
commit 221aa2c905
1 changed files with 1 additions and 1 deletions

View File

@ -474,7 +474,7 @@
layer.contents = (__bridge id)currentFrame.CGImage;
} else {
// If we have no animation frames, call super implementation. iOS 14+ UIImageView use this delegate method for rendering.
if ([super respondsToSelector:@selector(displayLayer:)]) {
if ([UIImageView instancesRespondToSelector:@selector(displayLayer:)]) {
[super displayLayer:layer];
}
}