Vinod
Vinod

Reputation: 17

select one cell at a time in UITableView

When I tap a cell in UITableView then the cell is selected and show selection with blue color.

But duration the loading next when a tap to one another cell that is also show as selected with blue.

Can I stop multiple selection in a UITableView? or deselect the cells for selection after one cell is selected? and also allow to be selectable when i return to this view.

Upvotes: 1

Views: 1541

Answers (2)

Dugh
Dugh

Reputation: 171

Best to use:

[your_UITableView setAllowsSelection:false];

Upvotes: 1

Wolfgang Schreurs
Wolfgang Schreurs

Reputation: 11834

Every tableView has the method -deselectRowAtIndexPath:. You can use it whenever the user taps a cell (inside the -didSelectRowAtIndexPath:) or any other spot you want to use it.

Upvotes: 0

Related Questions