iOS:fix localPath cannot load animated image

This commit is contained in:
pengfei.zhou 2020-03-27 16:02:58 +08:00 committed by osborn
parent 45dc82db35
commit 0516ad0f5a

View File

@ -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) {