我正在尝试将对象添加到数组中,但它发送 zig bart 错误“无法识别的选择器发送到实例”下面是我的代码
AppDelegate *appdelegate = (AppDelegate *)[[UIApplication sharedApplication]delegate];
NSDictionary *infomation = [self dictionaryWithContentsOfJSONString:@"Contacts.json"];
IstructContactsOrgByEntity *ObjIstructContactsOrgByEntity=[[IstructContactsOrgByEntity alloc]initWithIstructContactsOrgByEntity:infomation];
NSArray *array=[infomation objectForKey:@"contacts_list"];
for (int ndx = 0; ndx < [array count]; ndx++)
{
NSDictionary *stream = (NSDictionary *)[array objectAtIndex:ndx];
IstructContacts_List *ObjIstructContacts_List=[[IstructContacts_List alloc]initWithIstructContacts_List:stream];
NSArray *Qnarray=[stream objectForKey:@"contacts"];
for (int i=0; i<Qnarray.count; i++)
{
NSDictionary *Qnstream = (NSDictionary *)[Qnarray objectAtIndex:i];
IstructContacts *ObjIstructContacts=[[IstructContacts alloc]initWithIstructContacts:Qnstream];
[ObjIstructContacts_List.m_muteArrContacts addObject:ObjIstructContacts];
}
[ObjIstructContactsOrgByEntity.m_muteArrContacts_List addObject:ObjIstructContacts_List];
}
[appdelegate.m_ArrContactsOrgEntity addObject:ObjIstructContactsOrgByEntity];
最后一行 [appdelegate.m_ArrContactsOrgEntity addObject:ObjIstructContactsOrgByEntity];
导致我出现问题。