diff --git a/doric-iOS/Pod/Classes/Shader/DoricImageNode.m b/doric-iOS/Pod/Classes/Shader/DoricImageNode.m index 5a3521b3..5aaa3e68 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricImageNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricImageNode.m @@ -557,6 +557,13 @@ - (void)blendView:(UIImageView *)view forPropName:(NSString *)name propValue:(id } else if ([@"imageScale" isEqualToString:name]) { //Do not need set } else if ([@"onAnimationEnd" isEqualToString:name]) { + 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 + } self.animationEndCallbackId = prop; DoricImageView *doricImageView = (DoricImageView *) view; #if DORIC_USE_YYWEBIMAGE