Which row did the user swipe-to-delete?
The user swipes 1 of 开发者_开发问答the rows in a UITableView and hits the DELETE button.
The user clicks on DELETE and it brings up an UIActionSheet to pick 1 of 2 dangerous delete choices.
The user clicks on 1 of those buttons... and I run some code called "myCode:".
...
Once inside "myCode:", how do I detect which row the user is trying to delete?
Is there some kind of indexPathForDeletedRow method?
(Similar to the very handy indexPathForSelectedRow method.)
The simplest way is to create an ivar to hold the NSIndexPath associated with the cell pending deletion. Just save that away right before creating and presenting your action sheet.
精彩评论