iOS:fix localPath cannot load animated image
This commit is contained in:
parent
45dc82db35
commit
0516ad0f5a
@ -230,8 +230,9 @@ - (void)blendView:(UIImageView *)view forPropName:(NSString *)name propValue:(id
|
|||||||
|
|
||||||
}
|
}
|
||||||
} else if ([@"imageRes" isEqualToString:name]) {
|
} else if ([@"imageRes" isEqualToString:name]) {
|
||||||
UIImage *image = [UIImage imageNamed:prop];
|
YYImage *image = [YYImage imageNamed:prop];
|
||||||
view.image = image;
|
view.image = image;
|
||||||
|
|
||||||
if (self.loadCallbackId.length > 0) {
|
if (self.loadCallbackId.length > 0) {
|
||||||
if (image) {
|
if (image) {
|
||||||
[self callJSResponse:self.loadCallbackId,
|
[self callJSResponse:self.loadCallbackId,
|
||||||
@ -245,7 +246,7 @@ - (void)blendView:(UIImageView *)view forPropName:(NSString *)name propValue:(id
|
|||||||
} else if ([@"imagePath" isEqualToString:name]) {
|
} else if ([@"imagePath" isEqualToString:name]) {
|
||||||
NSString *path = [[NSBundle mainBundle] bundlePath];
|
NSString *path = [[NSBundle mainBundle] bundlePath];
|
||||||
NSString *fullPath = [path stringByAppendingPathComponent:prop];
|
NSString *fullPath = [path stringByAppendingPathComponent:prop];
|
||||||
UIImage *image = [UIImage imageWithContentsOfFile:fullPath];
|
YYImage *image = [YYImage imageWithContentsOfFile:fullPath];
|
||||||
view.image = image;
|
view.image = image;
|
||||||
if (self.loadCallbackId.length > 0) {
|
if (self.loadCallbackId.length > 0) {
|
||||||
if (image) {
|
if (image) {
|
||||||
|
Reference in New Issue
Block a user