From 7e5de707be0d0bdfe90f908b1fc7d6de08050613 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Thu, 21 Jul 2016 07:45:50 -0700 Subject: [PATCH] Remove deprecated RCTImageLoader methods Reviewed By: mmmulani Differential Revision: D3586474 fbshipit-source-id: b2be11d3673c3db1f3a79e0c4abfead8c988d82a --- Libraries/Image/RCTImageLoader.h | 42 ---------------- Libraries/Image/RCTImageLoader.m | 84 -------------------------------- 2 files changed, 126 deletions(-) diff --git a/Libraries/Image/RCTImageLoader.h b/Libraries/Image/RCTImageLoader.h index b54d1a0fc..fadb2b5ca 100644 --- a/Libraries/Image/RCTImageLoader.h +++ b/Libraries/Image/RCTImageLoader.h @@ -94,48 +94,6 @@ typedef dispatch_block_t RCTImageLoaderCancellationBlock; @end -@interface RCTImageLoader (Deprecated) - -- (RCTImageLoaderCancellationBlock)loadImageWithTag:(NSString *)imageTag - callback:(RCTImageLoaderCompletionBlock)callback -__deprecated_msg("Use loadImageWithURLRequest:callback: instead"); - -- (RCTImageLoaderCancellationBlock)loadImageWithTag:(NSString *)imageTag - size:(CGSize)size - scale:(CGFloat)scale - resizeMode:(RCTResizeMode)resizeMode - progressBlock:(RCTImageLoaderProgressBlock)progressBlock - completionBlock:(RCTImageLoaderCompletionBlock)completionBlock -__deprecated_msg("Use loadImageWithURLRequest:size:scale:clipped:resizeMode:progressBlock:completionBlock: instead"); - -- (RCTImageLoaderCancellationBlock)loadImageWithoutClipping:(NSString *)imageTag - size:(CGSize)size - scale:(CGFloat)scale - resizeMode:(RCTResizeMode)resizeMode - progressBlock:(RCTImageLoaderProgressBlock)progressBlock - completionBlock:(RCTImageLoaderCompletionBlock)completionBlock -__deprecated_msg("Use loadImageWithURLRequest:size:scale:clipped:resizeMode:progressBlock:completionBlock: instead"); - -- (RCTImageLoaderCancellationBlock)decodeImageData:(NSData *)imageData - size:(CGSize)size - scale:(CGFloat)scale - resizeMode:(RCTResizeMode)resizeMode - completionBlock:(RCTImageLoaderCompletionBlock)completionBlock -__deprecated_msg("Use decodeImageData:size:scale:clipped:resizeMode:completionBlock: instead"); - -- (RCTImageLoaderCancellationBlock)decodeImageDataWithoutClipping:(NSData *)data - size:(CGSize)size - scale:(CGFloat)scale - resizeMode:(RCTResizeMode)resizeMode - completionBlock:(RCTImageLoaderCompletionBlock)completionBlock -__deprecated_msg("Use decodeImageData:size:scale:clipped:resizeMode:completionBlock: instead"); - -- (RCTImageLoaderCancellationBlock)getImageSize:(NSString *)imageTag - block:(void(^)(NSError *error, CGSize size))completionBlock -__deprecated_msg("Use getImageSizeWithURLRequest:block: instead"); - -@end - @interface RCTBridge (RCTImageLoader) /** diff --git a/Libraries/Image/RCTImageLoader.m b/Libraries/Image/RCTImageLoader.m index 11428a568..78337bdff 100644 --- a/Libraries/Image/RCTImageLoader.m +++ b/Libraries/Image/RCTImageLoader.m @@ -755,90 +755,6 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image, @end -@implementation RCTImageLoader (Deprecated) - -- (RCTImageLoaderCancellationBlock)loadImageWithTag:(NSString *)imageTag - callback:(RCTImageLoaderCompletionBlock)callback -{ - RCTLogWarn(@"[RCTImageLoader loadImageWithTag:callback:] is deprecated. Instead use [RCTImageLoader loadImageWithURLRequest:callback:]"); - return [self loadImageWithURLRequest:[RCTConvert NSURLRequest:imageTag] - callback:callback]; -} - -- (RCTImageLoaderCancellationBlock)loadImageWithTag:(NSString *)imageTag - size:(CGSize)size - scale:(CGFloat)scale - resizeMode:(RCTResizeMode)resizeMode - progressBlock:(RCTImageLoaderProgressBlock)progressBlock - completionBlock:(RCTImageLoaderCompletionBlock)completionBlock -{ - RCTLogWarn(@"[RCTImageLoader loadImageWithTag:size:scale:resizeMode:progressBlock:completionBlock:] is deprecated. Instead use [RCTImageLoader loadImageWithURLRequest:size:scale:clipped:resizeMode:progressBlock:completionBlock:]"); - return [self loadImageWithURLRequest:[RCTConvert NSURLRequest:imageTag] - size:size - scale:scale - clipped:YES - resizeMode:resizeMode - progressBlock:progressBlock - completionBlock:completionBlock]; -} - -- (RCTImageLoaderCancellationBlock)loadImageWithoutClipping:(NSString *)imageTag - size:(CGSize)size - scale:(CGFloat)scale - resizeMode:(RCTResizeMode)resizeMode - progressBlock:(RCTImageLoaderProgressBlock)progressBlock - completionBlock:(RCTImageLoaderCompletionBlock)completionBlock -{ - RCTLogWarn(@"[RCTImageLoader loadImageWithoutClipping:size:scale:resizeMode:progressBlock:completionBlock:] is deprecated. Instead use [RCTImageLoader loadImageWithURLRequest:size:scale:clipped:resizeMode:progressBlock:completionBlock:]"); - return [self loadImageWithURLRequest:[RCTConvert NSURLRequest:imageTag] - size:size - scale:scale - clipped:NO - resizeMode:resizeMode - progressBlock:progressBlock - completionBlock:completionBlock]; -} - -- (RCTImageLoaderCancellationBlock)decodeImageData:(NSData *)imageData - size:(CGSize)size - scale:(CGFloat)scale - resizeMode:(RCTResizeMode)resizeMode - completionBlock:(RCTImageLoaderCompletionBlock)completionBlock -{ - RCTLogWarn(@"[RCTImageLoader decodeImageData:size:scale:resizeMode:completionBlock:] is deprecated. Instead use [RCTImageLoader decodeImageData:size:scale:clipped:resizeMode:completionBlock:]"); - return [self decodeImageData:imageData - size:size - scale:scale - clipped:NO - resizeMode:resizeMode - completionBlock:completionBlock]; -} - -- (RCTImageLoaderCancellationBlock)decodeImageDataWithoutClipping:(NSData *)imageData - size:(CGSize)size - scale:(CGFloat)scale - resizeMode:(RCTResizeMode)resizeMode - completionBlock:(RCTImageLoaderCompletionBlock)completionBlock -{ - RCTLogWarn(@"[RCTImageLoader decodeImageDataWithoutClipping:size:scale:resizeMode:completionBlock:] is deprecated. Instead use [RCTImageLoader decodeImageData:size:scale:clipped:resizeMode:completionBlock:]"); - return [self decodeImageData:imageData - size:size - scale:scale - clipped:NO - resizeMode:resizeMode - completionBlock:completionBlock]; -} - -- (RCTImageLoaderCancellationBlock)getImageSize:(NSString *)imageTag - block:(void(^)(NSError *error, CGSize size))completionBlock -{ - RCTLogWarn(@"[RCTImageLoader getImageSize:block:] is deprecated. Instead use [RCTImageLoader getImageSizeForURLRequest:block:]"); - return [self getImageSizeForURLRequest:[RCTConvert NSURLRequest:imageTag] - block:completionBlock]; -} - -@end - @implementation RCTBridge (RCTImageLoader) - (RCTImageLoader *)imageLoader