What is __NSCFArray in AFNetworking 2.0 response?

前端 未结 2 1397
野的像风
野的像风 2021-01-29 06:23

What is __NSCFArray in this AFNetworking 2.0 response:

- (void)loadData:(NSMutableArray *) resDic
{
    ... 
    [operation setCompletionBlockWithSu         


        
2条回答
  •  隐瞒了意图╮
    2021-01-29 07:07

    It is already an NSArray, something you can verify by calling:

    BOOL isKindOfArray = [responseObject isKindOfClass:[NSArray class]];
    

    NSArray is implemented as a class cluster and one of the private subclasses that it might return is __NSCFArray.

    The point of a class cluster is that the framework can provide different implementations under the hood that you don't really have to care about. As far as you should be concerned, it's an NSArray.

提交回复
热议问题