Remove deprecated RCTImageLoader methods

Reviewed By: mmmulani

Differential Revision: D3586474

fbshipit-source-id: b2be11d3673c3db1f3a79e0c4abfead8c988d82a
This commit is contained in:
Pieter De Baets 2016-07-21 07:45:50 -07:00 committed by Facebook Github Bot 2
parent da063e3d55
commit 7e5de707be
2 changed files with 0 additions and 126 deletions

View File

@ -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)
/**

View File

@ -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