OpenThread
OpenThread

Reputation: 2094

how to perform a custom move of UITableViewCell?

I want to move cells just as these two methods do:

- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath;
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath;

Before I use these methods above to move cells (by user's touch action), tableView's setEditing:animated: must be called first.

But what I want is user long press then drag a cell to move it without entering editing style, and i hope these moving view won't appear in cells' right, like this:

enter image description here

Any suggestion? Special thx!

Upvotes: 2

Views: 2732

Answers (1)

OpenThread
OpenThread

Reputation: 2094

One solution: http://b2cloud.com.au/how-to-guides/reordering-a-uitableviewcell-from-any-touch-point

but it can't use long press gesture to begin draging

And we can use FMMoveTableView to do this.

Upvotes: 1

Related Questions