我正在像这样将对象设置为我的 NSMutableDictionary
if ([detail isEqualToString:[check objectAtIndex:1]]) {//check is NSArray,getdict is NSMutableDictionary,keyverify is NSMutableArray
if ([getdict objectForKey:detail]==nil) {
[getdict setObject:[check objectAtIndex:2] forKey:detail];
[keyverify addObject:[check objectAtIndex:2]];
}
else{
[keyverify addObject:[check objectAtIndex:2]];
[getdict setObject:keyverify forKey:detail];
}
}
NSArray * passarray=[getdict valueForKey:detail];
当我的 NSMutableDictionary 值是这样的
dict:{
"Sample" = (
"Test1",
Test2,
Test3
);
}
我可以从 NSMutableDictionary 获取一个数组并显示在 UITableView 中,但是当我得到这样的 NSMutableDictionary 值时
dict:{
"Sample" = Test1;
}
我的应用程序因日志而崩溃
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString count]: unrecognized selector sent to instance 0x6eab4c0'
请帮助我..谢谢..