How can I get a populated combobox to display its options in Swift?

非 Y 不嫁゛ 提交于 2019-12-03 20:13:50

Your comboBox is an IBOutlet, so the object is created for you already by the Storyboard; you just need to initialize it. So remove:

someComboBox = NSComboBox()

because that is allocating a new combo box and overwriting the reference to the one created in the Storyboard. Your new comboBox is not the one that is on screen.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!