Can't CTRL+Drag NSButton to custom NSView header

心已入冬 提交于 2019-12-02 00:48:31

I finally found a solution, that is a little weird but works as expected. Instead of connecting the NSButton to MyTableCellView header directly, I used the reversed path:

Manually create an outlet:

@property(retain, nonatomic) IBOutlet NSButton* button;

Then click the empty circle on the left, and drag it to your XIB file's button:

I have no idea why it works this way, please let me know if you know the anwser.

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