From 5452144468c2fbc157db7383e00ebd72bdad6af0 Mon Sep 17 00:00:00 2001 From: Mikael Sand Date: Sat, 19 Oct 2019 14:03:47 +0300 Subject: [PATCH] fix(ios): deprecation of RCTImageLoader fixes #1141 --- ios/Elements/RNSVGImage.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ios/Elements/RNSVGImage.m b/ios/Elements/RNSVGImage.m index aa2f8794..ee3c9123 100644 --- a/ios/Elements/RNSVGImage.m +++ b/ios/Elements/RNSVGImage.m @@ -9,7 +9,10 @@ #import "RNSVGImage.h" #import "RCTConvert+RNSVG.h" #import -#import +#import +#import +#import +#import #import #import "RNSVGViewBox.h" @@ -40,7 +43,7 @@ _reloadImageCancellationBlock = nil; } - _reloadImageCancellationBlock = [self.bridge.imageLoader loadImageWithURLRequest:[RCTConvert NSURLRequest:src] callback:^(NSError *error, UIImage *image) { + _reloadImageCancellationBlock = [[self.bridge moduleForName:@"ImageLoader"] loadImageWithURLRequest:[RCTConvert NSURLRequest:src] callback:^(NSError *error, UIImage *image) { dispatch_async(dispatch_get_main_queue(), ^{ self->_image = CGImageRetain(image.CGImage); self->_imageSize = CGSizeMake(CGImageGetWidth(self->_image), CGImageGetHeight(self->_image));