对 NSMutableDictionary 数据进行排序
在我的应用程序中,我有一个字典,其中包含键 AZ,即未排序的 26 个字符,即例如 A、B、C、...... 我想首先按字母顺序对字典键进行排序,并对与每个键相关的数据进行排序,然后再次将其存储在同一个字典中。
NSArray *myKeys = [mGlossaryDict allKeys];
NSArray *op = [myKeys sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
到目前为止,我有一个 mGlossaryDict,它是一个已排序的可变字典,但我需要对每个键的数据进行排序。 请帮帮我。
In my application I am having a dictionary which contains Keys A-Z ie 26 characters which are not in sorted ie for eg A,B,C,......
I want to Sort first The dictionary keys alphabetically and also the sort the data related to each key and then again store that in same dictionary.
NSArray *myKeys = [mGlossaryDict allKeys];
NSArray *op = [myKeys sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
until now here I have an mGlossaryDict which is an Mutabledictionary which is sorted but i need to sort the data from each of the key.
Please help me out.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)