Advertise Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

sdkIQ for iPhone
($4.99)

Your First iPhone App
($1.99)

iPhone Code Generator
($9.99)

Dual Matches
($0.99)

Calcuccino Programmers' Calculator
($2.99)

SDKtoday
(free)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 08-21-2008, 02:44 PM   #19 (permalink)
myersn024
Tutorial Author
 
Join Date: May 2008
Posts: 315
Default

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.
myersn024 is offline   Reply With Quote
 
» Advertisements
» Online Users: 358
20 members and 338 guests
AdamSubach, anonymous@, benoitr007, bensj, Danneman, Duncan C, gtyt38, Jeremy1026, lifeCoder45, maxus182, mox, Ovidius, Paul10, pofak, raheel, squidboy, ufbobbo, ultrayard077
Most users ever online was 965, 06-30-2010 at 04:26 AM.
» Stats
Members: 41,859
Threads: 49,768
Posts: 213,052
Top Poster: BrianSlick (3,138)
Welcome to our newest member, ultrayard077
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:50 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.