From what I've gathered from reading Apple's documentation is that the controllers are supposed to be the non-reusable part of the code. Based on that, the views shouldn't talk directly to the delegate; they should pass messages to their controllers and the controllers, in turn, pass messages to the delegate. However, no where in their documentation do they talk about how to handle delegates in the MVC schemata. My personal interpretation it is that the delegate is there for the controllers to use for, among other things, a shared resource. I base that assumption on the fact that I haven't ran across another class type for iPhone programming that has a singleton instance that can easily be accessed without creating the singleton yourself.
I think that everyone is in agreement that the view methods telling the delegate to flip views should lie in the controllers. After reading all this discussion, I've decided that I should probably re-do the tutorial to show proper MVC based design.
Last edited by myersn024; 08-21-2008 at 02:47 PM.
|