Ios AF3或4.01迁移

Ios AF3或4.01迁移,ios,xcode,afnetworking,afnetworking-3,afhttpsessionmanager,Ios,Xcode,Afnetworking,Afnetworking 3,Afhttpsessionmanager,我使用的是AFnetworging 2.0.6,我想迁移到3或4.0.1 我对这部分代码有问题 我知道AFHTTPRequestOperation,它不能在版本3或4上重用。 我这里有一些错误 你能帮帮我吗 - (void)succeedWithOperation:(AFHTTPRequestOperation *)succeedOperation method:(NSString *)method { NSMutableDictionary *data = [NSMutable

我使用的是AFnetworging 2.0.6,我想迁移到3或4.0.1

我对这部分代码有问题 我知道AFHTTPRequestOperation,它不能在版本3或4上重用。 我这里有一些错误

你能帮帮我吗

    - (void)succeedWithOperation:(AFHTTPRequestOperation *)succeedOperation method:(NSString *)method
{
    NSMutableDictionary *data = [NSMutableDictionary dictionary];
    if (succeedOperation.response) {
        data[@"code"] = @([succeedOperation.response statusCode]);
    }
    if (succeedOperation.responseData) {
        data[@"rawResponse"] = [succeedOperation.responseData copy];
    }
    if (succeedOperation.responseString) {
        data[@"stringResponse"] = [succeedOperation.responseString copy];
    }
在类型为“\u strong id”的对象上找不到类似==>属性“response”的错误

如果我通过AFHTTPSessionManager或NSURLSessionDataTask更改AFHTTPRequestOperation,我将

“NSURLResponse”没有可见的@interface声明选择器“statusCode”

谢谢你的帮助