osx - Steps to convert a new xcode cocoa project using 1 controller per nib -


i want start off new xcode project using 1 nib per controller. default seems xcode creates:

1. delegate .h/.m 2. mainmenu.xib 

and looking @ targets project, see 'main nib file base name' set mainmenu, principal class nsapplication.

since cocoa mvc based, how things mvc based on default template?

how can wire things 'mainwindowcontroller' instead of default setup? if can explain steps me appreciated.

you don't want subvert or change default setup, understand , work within it. mvc description of responsibility rather hard requirement naming.

the delegate .h/.m app delegate name, responsibility app controller. gets setup when app starts , deals application level events. shouldn't isn't related application level management.

the mainmenu.xib container / archive of first views , controllers created when application opens.

there no model in template display main window static string on it...

your goal of using 1 nib per controller fine, should little flexible naming @ first. because mainmenu.xib contains main window should contain mainwindowcontroller. perfect mvc point of view because separating responsibility.

then, future controllers , views (in xibs) can have matching names keep clear. , can created model separately.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -