当我在其中添加值时,NSMutableDictionary
会自动设置 Key wise。我如何禁用它并按照第一组第一组和第二组第二组进行排列。
NSMutableDictionary* filteredDictionary = [NSMutableDictionary dictionary];
[filteredDictionary setObject:@"abc" forKey:@"1"];
[filteredDictionary setObject:@"abc" forKey:@"3"];
[filteredDictionary setObject:@"abc" forKey:@"2"];
[filteredDictionary setObject:@"abc" forKey:@"5"];
[filteredDictionary setObject:@"abc" forKey:@"4"];
NSLog(@"%@",filteredDictionary);
current output:
{
1 = abc;
2 = abc;
3 = abc;
4 = abc;
5 = abc;
}
but i want
{
1 = abc;
3 = abc;
2 = abc;
5 = abc;
4 = abc;
}
有什么办法可以禁用按键排序?