[__NSCFArray objectForKey:]: unrecognized selector sent to instance

前端 未结 3 1304
执笔经年
执笔经年 2020-12-06 07:19

I am trying to get a value for a particular key from a dictionary but i get a \"[__NSCFArray objectForKey:]: unrecognized selector sent to instance \"

-(voi         


        
3条回答
  •  伪装坚强ぢ
    2020-12-06 07:56

    Try this:

     NSMutableDictionary *dct =[avatars objectAtIndex:0];
    
     NSDictionary *avatarimage = [dct objectForKey:@"- image"];
    
     NSString *name = [dct objectForKey:@"name"];
    

提交回复
热议问题