Re: Building an MVC based App for Mac OS X - NOT for iOS
Re: Building an MVC based App for Mac OS X - NOT for iOS
- Subject: Re: Building an MVC based App for Mac OS X - NOT for iOS
- From: Jens Alfke <email@hidden>
- Date: Mon, 27 May 2013 22:13:59 -0700
On May 27, 2013, at 8:34 PM, YT <email@hidden> wrote:
> SO what I am after is a ViewController. I have a View placed in a Window where I use Quartz 2D to draw graphics into and need a Controller. The Interface Builder was trying to force me to place ACTIONS AND OUTLETS in the Delegate files.
> I found that (as a nubee) very disconcerting and confidence shaking with regard to my experience with using an MVC.
It’s pretty common to have a window controller, and make it responsible for managing the views in the window too. (NSViewController wasn’t added until OS X 10.5 or so.)
You can use NSViewController if you want to be more modular, especially if you want to use the same view (or view hierarchy) in multiple windows, but it’s not any more or less MVC compliant. It’s just a difference in what granularity you make your controllers. Also, “controller” is really just a role in a design pattern; it doesn’t have to inherit from some system class with “Controller” in the name to be a valid controller.
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden