Fixing AFImageRequestOperation to use [self alloc] instead of explicit class in class method in order to preserve behavior in subclasses
Signed-off-by: Mattt Thompson <m@mattt.me>
This commit is contained in:
parent
566a40f469
commit
ab00b9559c
1 changed files with 2 additions and 2 deletions
|
|
@ -75,7 +75,7 @@ static dispatch_queue_t image_request_operation_processing_queue() {
|
|||
success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success
|
||||
failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure
|
||||
{
|
||||
AFImageRequestOperation *requestOperation = [[AFImageRequestOperation alloc] initWithRequest:urlRequest];
|
||||
AFImageRequestOperation *requestOperation = [(AFImageRequestOperation *)[self alloc] initWithRequest:urlRequest];
|
||||
[requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
|
||||
if (success) {
|
||||
UIImage *image = responseObject;
|
||||
|
|
@ -106,7 +106,7 @@ static dispatch_queue_t image_request_operation_processing_queue() {
|
|||
success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSImage *image))success
|
||||
failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure
|
||||
{
|
||||
AFImageRequestOperation *requestOperation = [[AFImageRequestOperation alloc] initWithRequest:urlRequest];
|
||||
AFImageRequestOperation *requestOperation = [(AFImageRequestOperation *)[self alloc] initWithRequest:urlRequest];
|
||||
[requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
|
||||
if (success) {
|
||||
NSImage *image = responseObject;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue