FMMoveTable is an
UITableView subclass that provides moving rows by simply tap and hold an appropriate row without switching the table to its edit mode.
I wrote FMMoveTable for use in one of my own apps and think that it could be quite useful (and very time-saving) for others.
If you find it helpful, a Paypal donation would be very appreciated (donation [at] madeFM [dot] com).
How to use
- Import the
- Add FMMoveTableView.(h/m) and FMMoveTableViewCell.(h/m) to your project
- Change you
UITableViewsubclass to be a subclass of
- Change your
UITableViewCellsubclass to be a subclass of
- Update your
UI(Table)ViewControllerto conform to
- Implement at least the delegate method
moveTableView:moveRowFromIndexPath:toIndexPath:to update your model after a move
- Implement some additional checked in your table view data source / delegate. Check the
FMMoveViewControllerfor further details
Addopts the known
UITableViewDelegate methods to check whether a row:
Can be moved:
Can move to an index path:
Uses a method
prepareForMove that you may need to overwrite if you use a custom subclass.
In it's basic implementation it resets the
I can't answer any questions about how to use the code, but I'd love to read any emails telling me that you're using it, creating an app with it, or just saying thanks.