一般是类型不匹配,比如你用数组接一个空数据;
可以加上这个判断,判断要接的数据的类型是否是数组。
if ([[json objectForKey:@"data"] isKindOfClass:[NSMutableArray class]]){
}
判断数组不为空。
if (_arrayPhone !=nil && ![_arrayPhone isKindOfClass:[NSNull class]] &&_arrayPhone.count !=0){
}
一般是类型不匹配,比如你用数组接一个空数据;
可以加上这个判断,判断要接的数据的类型是否是数组。
if ([[json objectForKey:@"data"] isKindOfClass:[NSMutableArray class]]){
}
判断数组不为空。
if (_arrayPhone !=nil && ![_arrayPhone isKindOfClass:[NSNull class]] &&_arrayPhone.count !=0){
}