Get rid of deprecation warning on iOS. (#38)
This commit is contained in:
parent
ad4a4070eb
commit
8e9adf7a13
|
@ -50,7 +50,7 @@ RCT_EXPORT_METHOD(createResizedImage:(NSString *)path
|
||||||
CGSize newSize = CGSizeMake(width, height);
|
CGSize newSize = CGSizeMake(width, height);
|
||||||
NSString* fullPath = generateFilePath(@"jpg", outputPath);
|
NSString* fullPath = generateFilePath(@"jpg", outputPath);
|
||||||
|
|
||||||
[_bridge.imageLoader loadImageWithTag:path callback:^(NSError *error, UIImage *image) {
|
[_bridge.imageLoader loadImageWithURLRequest:[RCTConvert NSURLRequest:path] callback:^(NSError *error, UIImage *image) {
|
||||||
if (error || image == nil) {
|
if (error || image == nil) {
|
||||||
if ([path hasPrefix:@"data:"] || [path hasPrefix:@"file:"]) {
|
if ([path hasPrefix:@"data:"] || [path hasPrefix:@"file:"]) {
|
||||||
NSURL *imageUrl = [[NSURL alloc] initWithString:path];
|
NSURL *imageUrl = [[NSURL alloc] initWithString:path];
|
||||||
|
|
Loading…
Reference in New Issue