【发布时间】:2013-09-14 00:46:08
【问题描述】:
您好,我有一本由我设置并正在访问的字典 代码如下。
NSMutableDictionary* filteredDictionary = [NSMutableDictionary dictionary];
[filteredDictionary setObject:@"xcode" forKey:@"1"];
[filteredDictionary setObject:@"ios" forKey:@"3"];
[filteredDictionary setObject:@"ipad" forKey:@"2"];
[filteredDictionary setObject:@"iphone" forKey:@"5"];
[filteredDictionary setObject:@"simulator" forKey:@"4"];
NSLog(@"%@",filteredDictionary);
当前输出:
{
1 = xcode;
2 = ipad;
3 = ios;
4 = simulator;
5 = iphone;
}
but i want
{
1 = xcode;
3 = ios;
2 = ipad;
5 = iphone;
4 = simulator;
}
我想要字典,因为我在其中设置对象
我不想让字典按照它排序
请帮忙
提前致谢.....
【问题讨论】:
-
这会帮助你Old Question
标签: ios objective-c nsmutabledictionary