I haven't played with sliders, but here is an example for a switch:

UITableViewCell *yourCell = [tableView dequeueReusableCellWithIdentifier:YourCellIdentifier];
if (yourCell == nil)
{
yourCell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:YourCellIdentifier] autorelease];
                        
   UISwitch *switchView = [[UISwitch alloc] init];
   [switchView setOn: <your boolean criteria>];
[switchView addTarget:self action:@selector(yourMethod:) forControlEvents:UIControlEventValueChanged];
   [yourCell setAccessoryView: switchView];
   [switchView release], switchView = nil;
}

There are probably several ways of getting there.

Hope this helps.

Brian


On Jul 17, 2009, at 12:34 AM, Trygve Inda wrote:

I don't want to use the Settings app as I need a clean way for the user to get to the settings from within my app and then return to my app. So I need to build a grouped table view, with each cell containing a single control
(and a label) like the settings app does.

For example, I need a table with two rows, each row needs a label, slider
and text (numeric value of slider).

How can I do this? There seems to be no way to build it in IB directly. I need a way to make the two sliders IBOutlets so that I can manipulate them. As my cells will be static (just the label, slider, text), it seems simple,
but I have found no examples of this.

I also need another group - same as above but with switches.

Thanks for any leads to examples or the best way to achieve this.

Trygve


_______________________________________________

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/brianslick%40mac.com

This email sent to briansl...@mac.com

_______________________________________________

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