I am implementing a view to allow the user to select his preferences from 
within the app while it is running instead of having to exit the app to use the 
settings app to do so and then restarting my app.

The preferences view is controlled by the controller I am trying to define. It 
knows how to show the view and acts as both data source and delegate for the 
table view that contains the preference choices.

The trigger to do this is a double tap of the primary view which is handled by 
code in the view.m. So the view needs to tell the controller to obtain the 
prefs. The controller sets the standard user defaults to communicate the users 
choices.

On Dec 23, 2009, at 4:07 PM, David Duncan wrote:

> Is there a reason why your view so tightly bound to it's controller? 
> Typically you define a protocol for any object to respond to and expose a 
> delegate property to define that type of interface. Examples of this are very 
> common in AppKit and UIKit, such as NS/UITableView or UIImagePickerController.
> 
> --
> David Duncan @ My iPhone
> 
> On Dec 23, 2009, at 2:19 PM, Charlie Dickman <3tothe...@comcast.net> wrote:
> 
>> In an iPod Touch/iPhone app where the view is in 1 xib and it's controller 
>> is in a different one, according to the view-controller-data paradigm, is 
>> there a better way to link the view to the controller than
>> 
>> [(myView *) [[self view] setController: self]
>> 
>> in the controller where "controller" has been declared
>> 
>> id controller;
>> .
>> .
>> .
>> @property (nonatomic, assign) id controller;
>> 
>> in myView.h with
>> 
>> synthesize controller in myView.m?
>> 
>> Charlie Dickman
>> 3tothe...@comcast.net
>> 
>> 
>> 
>> _______________________________________________
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> 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:
>> http://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com
>> 
>> This email sent to david.dun...@apple.com

Charlie Dickman
3tothe...@comcast.net



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to