我怎样才能对NSDictionary进行排序? [英] How can I sort an NSDictionary?

查看:77
本文介绍了我怎样才能对NSDictionary进行排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

O有一个NSDictionary。在字典里面有一个数组。我想对字典进行排序并按升序显示它的值,所以请任何人帮助我如何获取排序数据?

O have an NSDictionary. Inside the dictionary there is an array. I want to sort the dictionary and display it's value in ascending order so please any one help me how can I get sorted data?

推荐答案

NSDictionary有三个功能......

There are three function of NSDictionary...

 – keysSortedByValueUsingSelector:
 – keysSortedByValueUsingComparator:
 – keysSortedByValueWithOptions:usingComparator:

这篇关于我怎样才能对NSDictionary进行排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆