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 <[email protected]> Authored: Sun Mar 25 21:56:17 2018 +0800 Committer: acton393 <[email protected]> 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;
