views:

12

answers:

1

Hey guys,

When you drag over a UITableViewCell in a TableView, the cell gets highlighted ("selected"), but didSelectRow... is not called. I wish to disable that selection. How would I do that? Note that setting the selectedStyle for a cell to selectedStyleNone, or something like that, is not what I want. I really want the OS not to select it.

Thanks in advance,

A: 

Hey,

I think the property your searching for is BOOL allowsSelection declared in UITableView. By passing "no" the tableViewCell is not selected when the user touches it. The same is true for BOOL allowsSelectionDuringEditing.

I hope that fixes your problem ;)

Lars Petersen
This wasn't what I was looking for (I solved it in this thread (http://stackoverflow.com/questions/3208865/swiping-a-row-in-a-tableview-clicking-other-selects-swiped)), but I can imagine that you thought I was looking for this! So good answer. :)
Nick