开发者

Mac Cocoa MainWindow mvc?

开发者 https://www.devze.com 2023-04-12 03:54 出处:网络
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 开发者_如何转开发

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

精彩评论

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

关注公众号