Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
全部,
在我的应用程序中,我需要使用 NSComboBox。组合框将显示的数据需要排序。
但是查看 Apple 文档,我看不到使控件具有 SORT 样式的方法。
任何熟悉 API 的人都可以为我指明正确的方向吗?
谢谢你。
NSComboBox是一种看法。
NSComboBox
您需要创建一个模型或模型的一部分作为它的数据源。
如果您正在使用数组(硬编码或从服务器获取数组),您可以对数组进行排序然后使用它们。