Cocoa without Interface Builder, initialize an instance of app controller?

后端 未结 3 1194
太阳男子
太阳男子 2020-12-30 16:24

I don\'t plan to write applications without IB, I\'m just in the process of trying to learn more about programming.

How can I get a single instance

3条回答
  •  不思量自难忘°
    2020-12-30 17:02

    A set of NIBs seem to be an unsatisfactory answer, even when represented in XML (as a XIB), because there's no easy way to compare or merge them with any standard subversion or SCM-style tool. The encoded information is fragile and not intended to be edited by mere humans. How would changes be represented by a GUI? Would I step through each attribute of each control and visually check them?

    If the app's behavior is written in code, however, there is a chance that I can figure out what's going in, even if I have to keep lots of details close at hand at the same time.

    A proposed solution: use a top-level NIB that the main architect coded up, but then code the rest of the app explicitly.

    Anybody got a better idea?

提交回复
热议问题