I have a simple tableview with cell like this.
Now I want to implement drag drop in this table view so that user can arrange cells. So I used this.
func tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -> Bool {
return true
}
func tableView(tableView: UITableView, editingStyleForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCellEditingStyle {
return UITableViewCellEditingStyle.None
}
func tableView(tableView: UITableView, shouldIndentWhileEditingRowAtIndexPath indexPath: NSIndexPath) -> Bool {
return false
}
func tableView(tableView: UITableView, moveRowAtIndexPath sourceIndexPath: NSIndexPath, toIndexPath destinationIndexPath: NSIndexPath) {
let card = self.arrCards.objectAtIndex(sourceIndexPath.row) as! Card
self.arrCards.removeObjectAtIndex(sourceIndexPath.row)
self.arrCards.insertObject(card, atIndex: destinationIndexPath.row)
}
Its showing the cell like this.
So here I don't want the three line button. How can I remove that button. I want the drag drop should happen when user is dragging the whole cell. I have tried to change accessoryType, editingAccessoryType, accessoryView, editingAccessoryView. But no luck till yet.