开发者

Directly accessing the NSPopupButtonCell of an NSPopupButton (Cocoa OSX)

开发者 https://www.devze.com 2022-12-28 04:06 出处:网络
I know this is not normally recommended but I really need to access the NSPopup开发者_如何学GoButtonCell of NSPopupButton.Is there a way to do this?[myPopup cell];

I know this is not normally recommended but I really need to access the NSPopup开发者_如何学GoButtonCell of NSPopupButton. Is there a way to do this?


[myPopup cell];

Kind of obvious, when you think about it. ;)

Really, tho'; NSPopUpButton : NSButton : NSControl; NSControl has -[cell], so NSPopUpButton does too.

I guess what I'm trying to say, is; if you can't find a method that the object you are looking at must have, check its superclasses. (Or just use text completion in Xcode and a few lucky guesses. ;)

0

精彩评论

暂无评论...
验证码 换一张
取 消