From e63a5132454163cbad9c0116f546eb8292c7937f Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Thu, 30 Dec 2021 11:12:58 +0800 Subject: [PATCH] iOS: fix compile error --- doric-iOS/Pod/Classes/Shader/DoricImageNode.m | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/doric-iOS/Pod/Classes/Shader/DoricImageNode.m b/doric-iOS/Pod/Classes/Shader/DoricImageNode.m index b8828125..0d1f0db2 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricImageNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricImageNode.m @@ -732,14 +732,6 @@ - (BOOL)needReload { return NO; } -- (void)dealloc { - if (self.animationEndCallbackId) { -#if DORIC_USE_YYWEBIMAGE - [(DoricImageView *) self.view removeObserver:self forKeyPath:@"currentIsPlayingAnimation" context:nil]; -#elif DORIC_USE_SDWEBIMAGE - [(DoricImageView *) self.view removeObserver:self forKeyPath:@"currentFrameIndex" context:nil]; -#endif - } - (NSDictionary *)getImageInfo { CGImageRef imageRef = [self.view.image CGImage]; return @{ @@ -771,4 +763,15 @@ - (NSData *)getImagePixels { return [[NSData alloc] initWithBytesNoCopy:imageData length:width * height * bytesPerPixel]; } + +- (void)dealloc { + if (self.animationEndCallbackId) { +#if DORIC_USE_YYWEBIMAGE + [(DoricImageView *) self.view removeObserver:self forKeyPath:@"currentIsPlayingAnimation" context:nil]; +#elif DORIC_USE_SDWEBIMAGE + [(DoricImageView *) self.view removeObserver:self forKeyPath:@"currentFrameIndex" context:nil]; +#endif + } +} + @end