I have a UITableView that represents a list of objects, I'd like the user to touch an object, drag it onto another one (as to combine them) and seeing the two disappearing and a new one appearing. I guess that I can't do this with the standard table view editing methods (a row cannot be dragged onto another one, am I right?). Shall I write my touch listeners? how can I do that?
Asked
Active
Viewed 7,507 times
1 Answers
0
I managed to find a workaround: after the first click on a custom UITableCellView I create a new UIView to put on top of the window that intercepts another touch+drag.
The other touch creates a UIImageView that copies the undelying clicked cell as a Image. This UIImageView can be dragged around along the UIView and then dismissed when necessary.
When I end the touch I look if it ended up a another cell, if so I get its indexPath and compute a coherent action

rano
- 5,616
- 4
- 40
- 66
-
Hi rano, can you post a sample code showing how do you lookup the drop cell? – Felipe Cypriano Jan 06 '11 at 20:14
-
I want this too http://stackoverflow.com/questions/5061693/how-move-reorder-cells-from-tableview1-to-tableview2 – mamcx Mar 13 '11 at 20:37
-
can we have some sample code which may help us more? I am stuck in `- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{` that what to do now after dropping my created image here :( please help – Wasim Sep 17 '11 at 18:28