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.
我想按字母顺序对 a 的NSMenuItems 进行NSPopUButton排序。 我检查了可可参考,但找不到执行此操作的函数。我错过了什么还是我必须编写自己的排序函数?提前致谢
NSMenuItem
NSPopUButton
没有方法可以对项目进行适当的排序,但是您可以:
itemArray
NSArray
removeAllItems
addItem: