Answers for "how to disable property swipe swift"

1

disable swipe to delete swift

override func tableView(tableView: UITableView, editingStyleForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCellEditingStyle {
    if tableView.editing {
        return UITableViewCellEditingStyle.Delete
    }
    return UITableViewCellEditingStyle.None
}
Posted by: Guest on March-28-2020
0

disable trailing swipe action swift

// instead of:

return UISwipeActionsConfiguration(actions: [deleteAction])

// do something like this:

let configuration = UISwipeActionsConfiguration(actions: [deleteAction])
configuration.performsFirstActionWithFullSwipe = false
return configuration
Posted by: Guest on March-28-2020

Code answers related to "Swift"

Browse Popular Code Answers by Language