开发者

Mac Cocoa MainWindow mvc?

I'm some time already iphone programmer, and now i'm try to write something for mac. My first cognitive dissonance - is that apple talk lot about MVC, and i'm successfully use mvc 开发者_如何转开发paradigm in my iphone apps, but i do not understand how to implement it in simplest mac app. Every book i'm read, say that i must bind gui elements from MainWindow.nib to MyAppDelegate. Where the hell is MVC paradigm here? I'm really whant to know, how to make simplest mac app with: MainWinow.nib, MainWindowController and MainVindow class file. And how to programmically show thos window from MyAppDelegate.


The easiest way to see it in action is to simply start a new Mac OS X project --> Cocoa application. That will provide a framework for a simple single-window Mac application.

Your question may be referring to bindings which is a Mac technology that directly connects model objects to the UI. Bindings can eliminate a lot of controller code; but there are plenty of applications out there that do not use bindings at all - and understanding that technology isn't crucial to understanding the trivial case of a simple single-window application.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜