From 4e263a7c91a5c48ce66855ed26aff54e74a839e9 Mon Sep 17 00:00:00 2001 From: shukaka Date: Fri, 7 Aug 2020 15:57:10 +0800 Subject: [PATCH] Update DoricImageNode.m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: iOS 上无法加载 Image.xcassets 中的图片 --- doric-iOS/Pod/Classes/Shader/DoricImageNode.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doric-iOS/Pod/Classes/Shader/DoricImageNode.m b/doric-iOS/Pod/Classes/Shader/DoricImageNode.m index 59eb2496..dff56206 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricImageNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricImageNode.m @@ -244,7 +244,11 @@ - (void)blendView:(UIImageView *)view forPropName:(NSString *)name propValue:(id } } else if ([@"imageRes" isEqualToString:name]) { YYImage *image = [YYImage imageNamed:prop]; - view.image = image; + if (image) { + view.image = image; + } else { + view.image = [UIImage imageNamed:prop]; + } if (self.loadCallbackId.length > 0) { if (image) {