如何在Objective-C的字典中存儲數組。我該如何修改我的代碼?如何在字典中存儲數組
studentDict=[[NSMutableDictionary alloc]init];
studentArray=[[NSMutableArray alloc]init];
[studentArray addObject:name.text];
[studentArray addObject:regno.text];
[studentArray addObject:marks.text];
[studentArray addObject:rank.text];
studentDict=[NSMutableDictionary dictionaryWithObjects:[NSMutableArray arrayWithObjects:studentArray, nil] forKeys:[NSMutableArray arrayWithObjects:studentArray, nil]];
NSLog(@"%@",studentArray);
'NSDictionary * studentsDictionary = @ {@「students」:studentArray};' – Zhang