【发布时间】:2010-04-28 04:28:55
【问题描述】:
我知道通常不建议这样做,但我确实需要访问 NSPopupButton 的 NSPopupButtonCell。有没有办法做到这一点?
【问题讨论】:
标签: cocoa macos nspopupbuttoncell nspopupbutton
我知道通常不建议这样做,但我确实需要访问 NSPopupButton 的 NSPopupButtonCell。有没有办法做到这一点?
【问题讨论】:
标签: cocoa macos nspopupbuttoncell nspopupbutton
[myPopup cell];
有点明显,当您考虑时。 ;)
真的,虽然'; NSPopUpButton : NSButton : NSControl; NSControl 有-[cell],所以NSPopUpButton 也有。
我想我想说的是;如果您找不到您正在查看的对象必须具有的方法,请检查其超类。 (或者只是在 Xcode 中使用文本完成和一些幸运的猜测。;)
【讨论】: