objective c - (OSX/Cocoa) How to set controller for main window -
i've created new cocoa application using .xib files (not storyboarded, app has backwards compatible mavericks/mountain lion) , have custom windowcontroller main window. possible? can't seem find way connect window desired custom controller. window has reference outlet in appdelegate, need custom nswindowcontroller window doesn't open on application launch. application launches silently menu bar app , main application launched via button press in drop down menu bar.
is there way link controller window in interface builder? or have along lines of :
wc = [[customwindowcontroller alloc] initwithwindownibname:@"main"]; thanks!
yes, open utilities (the right panel) in interface builder, , @ bottom click on object library (circle square in it).
search object (blue cube), , drag document outline (the panel on left inside of interface builder)
there, select object created, , change class in identity inspector window controller want.
finally can go connections inspector , connect window window outlet
Comments
Post a Comment