[Solved] Move UITableViewCell index in TableView [SWIFT]


This should work for your specific example (note that this assumes that your table view has only one section):

// Remove the item from the data array
let item = data.removeAtIndex(indexPath.row)
// Add the item again, at the end of the array
data.append(item)

// Move the corresponding row in the table view to reflect this change
tableView.moveRowAtIndexPath(indexPath, toIndexPath: NSIndexPath(forRow: data.count - 1, inSection: 0))

solved Move UITableViewCell index in TableView [SWIFT]