[Issue #1217] Cutting the knot with respect to API compatibility
This commit is contained in:
parent
44915d5173
commit
99f77d1381
1 changed files with 3 additions and 6 deletions
|
|
@ -36,12 +36,9 @@ static dispatch_queue_t image_request_operation_processing_queue() {
|
|||
#import <CoreGraphics/CoreGraphics.h>
|
||||
|
||||
static UIImage * AFImageWithDataAtScale(NSData *data, CGFloat scale) {
|
||||
if ([UIImage instancesRespondToSelector:@selector(initWithData:scale:)]) {
|
||||
return [[UIImage alloc] initWithData:data scale:scale];
|
||||
} else {
|
||||
UIImage *image = [[UIImage alloc] initWithData:data];
|
||||
return [[UIImage alloc] initWithCGImage:[image CGImage] scale:scale orientation:image.imageOrientation];
|
||||
}
|
||||
UIImage *image = [[UIImage alloc] initWithData:data];
|
||||
|
||||
return [[UIImage alloc] initWithCGImage:[image CGImage] scale:scale orientation:image.imageOrientation];
|
||||
}
|
||||
|
||||
static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *response, NSData *data, CGFloat scale) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue