Reputation: 269
I am currently using the advanced editing tableview as outlined in Monotouch.Dialog that allows a user to delete as well as edit the label of table elements. Is there a way to enrich the tableview to achieve something similar to the screenshot, i.e. change the ordering?
Upvotes: 2
Views: 769
Reputation: 1604
You need to add this two methods to your DialogViewController.Source
public override bool CanMoveRow (UITableView tableView, NSIndexPath indexPath)
{
return true;
}
public override void MoveRow (UITableView tableView, NSIndexPath sourceIndexPath, NSIndexPath destinationIndexPath)
{
tableView.MoveRow(sourceIndexPath,destinationIndexPath);
}
Upvotes: 5