iOS: fix compile error

This commit is contained in:
pengfei.zhou 2021-12-30 11:12:58 +08:00 committed by osborn
parent dd10c7f832
commit e63a513245

View File

@ -732,14 +732,6 @@ - (BOOL)needReload {
return NO; 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 { - (NSDictionary *)getImageInfo {
CGImageRef imageRef = [self.view.image CGImage]; CGImageRef imageRef = [self.view.image CGImage];
return @{ return @{
@ -771,4 +763,15 @@ - (NSData *)getImagePixels {
return [[NSData alloc] initWithBytesNoCopy:imageData length:width * height * bytesPerPixel]; 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 @end