开发者

Should a delegate go through a controller to get the model?

Trying to figure out the MVC-concept.

I have a NSC开发者_如何学GoustomView that implements drawRect:, which is based on a delegate specified in the controller of the custom view. My question is, should the delegate point to the model's controller, or is it ok to point the delegate directly to the model?

Should the NSCustomView ask the NSWindowController, to ask the Model's Controller, to ask the model for the data? Seems like there are too many layers to a "proper" MVC design.


More often than not, the delegate is the view controller, or fits into a controller-type role. If that's not your situation, it'll help if you explain what's going on in greater detail.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜