views:

44

answers:

1

Hi!

I´m working on a quiz application which uses a grouped UITableView, where i need to limit the users selection to one cell per group and also make the group selectable only once per group, in order to stop the user from correcting any potential wrong answers. Is there any way of doing this?

Cheers, Adam

A: 

You can select only one row in UITableView so it is not correct approach for you. You should look into using accessory views (e.g. using UITableViewCellAccessoryCheckmark type) and handle it in delegate's -didSelectRowAtIndexPath method - it is explicitely described in Apple's docs.

Discussion
The delegate handles selections in this method. One of the things it can do is exclusively assign the check-mark image (UITableViewCellAccessoryCheckmark) to one row in a section (radio-list style). See "Managing Selections" in Table View Programming Guide for iPhone OS for further information (and code examples) related to this method.

Vladimir