Created
November 10, 2017 12:48
-
-
Save pgpt10/e490907ca590355e9fd9f560ae1f0bd4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool | |
{ | |
return true | |
} | |
func tableView(_ tableView: UITableView, moveRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath) | |
{ | |
let item = self.items[sourceIndexPath.row] | |
self.items.remove(at: sourceIndexPath.row) | |
self.items.insert(item, at: destinationIndexPath.row) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment