You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2018/03/25 13:56:39 UTC

incubator-weex git commit: * [iOS] logging message when error loading image

Repository: incubator-weex
Updated Branches:
  refs/heads/master 86c7a7310 -> 85e659aa0


* [iOS] logging message when error loading image


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/85e659aa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/85e659aa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/85e659aa

Branch: refs/heads/master
Commit: 85e659aa0c3e746ad6da656fce3085605a94b644
Parents: 86c7a73
Author: acton393 <zh...@gmail.com>
Authored: Sun Mar 25 21:56:17 2018 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Sun Mar 25 21:56:17 2018 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/85e659aa/ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m
index 9f9d152..2cd2646 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m
@@ -377,6 +377,11 @@ WX_EXPORT_METHOD(@selector(save:))
             // progress when loading image
         } completed:^(UIImage *image, NSError *error, WXImageLoaderCacheType cacheType, NSURL *imageURL) {
             __strong typeof(weakSelf) strongSelf =  weakSelf;
+            weakSelf.imageDownloadFinish = YES;
+            if (error) {
+                // log error message for error
+                WXLogError(@"Error downloading image: %@, detail:%@", imageURL.absoluteString, [error localizedDescription]);
+            }
             if (strongSelf.imageLoadEvent) {
                 NSMutableDictionary *sizeDict = [NSMutableDictionary new];
                 sizeDict[@"naturalWidth"] = @0;