AFNetworking 2.0响应中的__NSCFArray是什么? [英] What is __NSCFArray in AFNetworking 2.0 response?

查看:141
本文介绍了AFNetworking 2.0响应中的__NSCFArray是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此AFNetworking 2.0响应中的__NSCFArray是什么:

What is __NSCFArray in this AFNetworking 2.0 response:

- (void)loadData:(NSMutableArray *) resDic
{
    ... 
    [operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {            
        NSLog(@"%@",[responseObject class]);  //__NSCFArray   
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        NSLog(@"Failure: %@", error);
    }];
    [operation start];
}

如何将其转换为NSArray?

How can I convert it to NSArray?

推荐答案

NSArray

NSArray is a class cluster. This basically means that NSArray objects could be made up of one of several different actual implementations and __NSCFArray is one of the classes (probably the most common) that NSArray can use to implement an array.

只需像使用其他NSArray一样使用__NSCFArray,它将正常工作.

Just use the __NSCFArray as you would any other NSArray and it'll work fine.

这篇关于AFNetworking 2.0响应中的__NSCFArray是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆