当我在 nsmutabledictionary 中设置值然后给出错误如下图所示....
这是我在 nsmutabledictionary 中设置值的代码
NSMutableArray *countArray=[[NSMutableArray alloc] init];
for (int i=0;i<artistName.count;i++)
{
int count=0;
NSMutableDictionary *dir1=[artistName objectAtIndex:i];
NSString *artist1=[dir1 objectForKey:@"SONG_ARTIST"];
for (int j=0;j<CurrentPlayingSong.count;j++)
{
NSDictionary *dir2=[CurrentPlayingSong objectAtIndex:j];
NSString *artist2=[dir2 objectForKey:@"SONG_ARTIST"];
if ([artist2 isEqualToString:artist1])
{
count++;
}
}
NSString *Size=[[NSString alloc] initWithFormat:@"%d",count];
[dir1 setObject:Size forKey:@"SIZE"];
[countArray addObject:dir1];
}
return countArray;