views:

193

answers:

1

I'd like to change the appearance of a cell when the user tap the drag handle. I searched in the documentation, the forums and google, but I can't find a method or an event that say when the drag icon is pressed.

Any help will be appreciated! Thanks

A: 

Does this function help:

// Allows customization of the target row for a particular row as it is being moved/reordered - (NSIndexPath *)tableView:(UITableView *)tableView targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath *)sourceIndexPath toProposedIndexPath:(NSIndexPath *)proposedDestinationIndexPath;

It doesn't seem to fire until the cell has been dragged about half way into another cell, though.

It is the only indication I could find that a cell is moving

justin
Thank you for your reply. At this point I'm thinking about another way but I don't known if is possibile: if I could access to the drag handle subview maybe I could attach a notification to the UIView tap and change the cell on this event. The documentation does not say anything how to access or change the drag handle, but it sound strange for me that no event is emitted when the cell start dragging.
ggould75
That might work. Iterate through the subviews in the TableViewCell to find out which one is the drag control, then derive a new TableViewCell class in which has a new grab control (one of your own making) and then over ride it's touchesmoved handler. It's a lot of work but it would actually work. It does seem strange that there is no onMoveStarted event, but I can't find one.
justin
Actually, it might be easier than that. There is a editingAccessoryViewCreate your own view and the table view cells editingAccessoryView set to that view. Then your view can detect the touch and send a notification to the cell.
justin