2
我試圖運行此代碼:什麼是AFImageRequestOperation頭文件中AFNetworking 2.0
#import "AFNetworking.h"
#import "AFHTTPRequestOperation.h"
AFImageRequestOperation *operation = [[AFImageRequestOperation alloc] initWithRequest:request];
[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject){
NSLog(@"%@", operation.responseData); // Data
NSLog(@"%@", [responseObject class]); // UIImage
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {}];
但有這些錯誤:
未知類型名稱
AFImageRequestOperation
;你的意思是AFHTTPRequestOperation
? 未知的接收器AFImageRequestOperation
;你的意思是AFHTTPRequestOperation
?
http://stackoverflow.com/questions/19172543/afnetworking-2-0-setimagewithurlrequest可能的重複 – titaniumdecoy