From 0516ad0f5aa08abcf617f9e7a61f586cb515739a Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Fri, 27 Mar 2020 16:02:58 +0800 Subject: [PATCH] iOS:fix localPath cannot load animated image --- doric-iOS/Pod/Classes/Shader/DoricImageNode.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doric-iOS/Pod/Classes/Shader/DoricImageNode.m b/doric-iOS/Pod/Classes/Shader/DoricImageNode.m index 60717845..695108cf 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricImageNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricImageNode.m @@ -230,8 +230,9 @@ - (void)blendView:(UIImageView *)view forPropName:(NSString *)name propValue:(id } } else if ([@"imageRes" isEqualToString:name]) { - UIImage *image = [UIImage imageNamed:prop]; + YYImage *image = [YYImage imageNamed:prop]; view.image = image; + if (self.loadCallbackId.length > 0) { if (image) { [self callJSResponse:self.loadCallbackId, @@ -245,7 +246,7 @@ - (void)blendView:(UIImageView *)view forPropName:(NSString *)name propValue:(id } else if ([@"imagePath" isEqualToString:name]) { NSString *path = [[NSBundle mainBundle] bundlePath]; NSString *fullPath = [path stringByAppendingPathComponent:prop]; - UIImage *image = [UIImage imageWithContentsOfFile:fullPath]; + YYImage *image = [YYImage imageWithContentsOfFile:fullPath]; view.image = image; if (self.loadCallbackId.length > 0) { if (image) {