开发者

Connections not working when loading window from nib file

开发者 https://www.devze.com 2023-03-23 09:09 出处:网络
I\'m launching a new window with a nib file as below: Workbench* workben开发者_C百科ch = [[Workbench alloc] initWithWindowNibName:@\"WorkbenchView\"];

I'm launching a new window with a nib file as below:

Workbench* workben开发者_C百科ch = [[Workbench alloc] initWithWindowNibName:@"WorkbenchView"];
[workbench showWindow:self];

However, none of the connections that I've made in Interface Builder seem to work. What do I need to do to have access to these outlets?


The issue turned out that I was trying to set delegates, etc too early in the init method. I moved my code to awakeFromNib and am now able to access everything just fine.

0

精彩评论

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