-4
我有一個字典如何按鍵排序我的NSMutableDictionary?
AlphaSite
BetaSite
GammaSite
我看到how can I sort NSMutableDictionary with keys value?但沒有幫助我很多
dictionaryOfWebsites = [[NSMutableDictionary alloc] init];
[dictionaryOfWebsites setObject:@"http://www.site1.com" forKey:@"AlphaSite1"];
[dictionaryOfWebsites setObject:@"http://www.site2.com" forKey:@"GammaSite2"];
[dictionaryOfWebsites setObject:@"http://www.site3.com" forKey:@"ZetaSite3"];
[dictionaryOfWebsites setObject:@"http://www.site4.com" forKey:@"BetaSite4"];
我想字典排序,以便我的結果是按字母順序排列(按鍵)
而對於第1938462727次:字典**仍然**未排序。 – 2013-04-29 21:03:07
我們應該提出一個功能請求來排序字典。謝謝! – 2013-04-29 21:37:16
爲什麼所有的downvotes? – 2013-05-22 15:32:36