Conforms to UITableViewDelegate
Declared in TKReorderTableView.h

Overview

The delegate of a TKReorderTableView object must adopt the TKReorderTableViewDelegate protocol.

Tasks

  • – tableView:willReorderRowAtIndexPath:

    This method is called when starting the re-ording process. You should likely replace the data object corresponding to this index path from the data model with a dummy object until the reordering is complete.

    required method
  • – tableView:moveRowAtIndexPath:toIndexPath:

    This method is called when the selected row is dragged to a new position. You simply update your data source to reflect that the rows have switched places. This can be called multiple times during the reordering process.

    required method
  • – tableView:didFinishReorderingAtIndexPath:

    This method is called when the selected row is released to its new position.

    required method

Instance Methods

tableView:didFinishReorderingAtIndexPath:

This method is called when the selected row is released to its new position.

- (void)tableView:(UITableView *)tableView didFinishReorderingAtIndexPath:(NSIndexPath *)indexPath

Parameters

tableView

The table view that will be reordered.

indexPath

The original index path of the cell being moved.

Discussion

This method is called when the selected row is released to its new position.

Declared In

TKReorderTableView.h

tableView:moveRowAtIndexPath:toIndexPath:

This method is called when the selected row is dragged to a new position. You simply update your data source to reflect that the rows have switched places. This can be called multiple times during the reordering process.

- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath

Parameters

tableView

The table view that will be reordered.

fromIndexPath

The original index path of the cell being moved.

toIndexPath

The new index path of the cell being moved.

Discussion

This method is called when the selected row is dragged to a new position. You simply update your data source to reflect that the rows have switched places. This can be called multiple times during the reordering process.

Declared In

TKReorderTableView.h

tableView:willReorderRowAtIndexPath:

This method is called when starting the re-ording process. You should likely replace the data object corresponding to this index path from the data model with a dummy object until the reordering is complete.

- (void)tableView:(UITableView *)tableView willReorderRowAtIndexPath:(NSIndexPath *)indexPath

Parameters

tableView

The table view that will be reordered.

indexPath

The index path of the table view cell that will be moved.

Discussion

This method is called when starting the re-ording process. You should likely replace the data object corresponding to this index path from the data model with a dummy object until the reordering is complete.

Declared In

TKReorderTableView.h