Update DoricImageNode.m

fix: iOS 上无法加载 Image.xcassets 中的图片
This commit is contained in:
shukaka 2020-08-07 15:57:10 +08:00 committed by osborn
parent ca6e0d5c39
commit 4e263a7c91

View File

@ -244,7 +244,11 @@ - (void)blendView:(UIImageView *)view forPropName:(NSString *)name propValue:(id
} }
} else if ([@"imageRes" isEqualToString:name]) { } else if ([@"imageRes" isEqualToString:name]) {
YYImage *image = [YYImage imageNamed:prop]; 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 (self.loadCallbackId.length > 0) {
if (image) { if (image) {