Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableView didSelectRow while editing?

I'm building an interface much like the built-in Weather application's flipside view, or the Alarms view of the Clock application in editing mode. The table view is always in editing mode, so the delete icon appears on the left side of each cell.

When the table view is in editing mode, my delegate doesn't receive didSelectRowAtIndexPath notifications. It receives accessoryButtonTappedForRowWithIndexPath notifications, but that's not what I want to do. I want my rows to stay selectable, even when the table view is in editing mode.

Any ideas on how I can accomplish this?

Thanks,

P.S. Hooray for the lifted NDA. =)

like image 613
Can Berk Güder Avatar asked Oct 06 '08 13:10

Can Berk Güder


2 Answers

Set table.allowsSelectionDuringEditing to YES.

like image 186
millenomi Avatar answered Oct 04 '22 03:10

millenomi


You can also set this in the attributes inspector. Make sure you select the table view, not the view controller, and select "Single Selection During Editing" in the Editing dropdown:enter image description here

like image 24
Symmetric Avatar answered Oct 04 '22 03:10

Symmetric