开发者

How to disable: Drag across UITableViewCell selects it

开发者 https://www.devze.com 2023-01-07 16:12 出处:网络
When you drag over a UITableViewCell in a TableView, the cell gets h开发者_如何学Cighlighted (\"selected\"), but didSelectRow... is not called. I wish to disable that selection. How would I do that? N

When you drag over a UITableViewCell in a TableView, the cell gets h开发者_如何学Cighlighted ("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,


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 ;)

0

精彩评论

暂无评论...
验证码 换一张
取 消