I am using the following code:
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
{
let cell = CellView(style: UITableViewCellStyle.default , reuseIdentifier: nil)
let selectView = UIView()
selectView.backgroundColor = UIColor(patternImage: UIImage(named:"ScrollImageTop1")!)
cell.selectedBackgroundView = selectView
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let cell = tableView.cellForRow(at: indexPath) as! CellView
remove(item: indexPath.item)
}
func remove(item : Int)
{
tableRows -= 1
tableView1.deleteRows(at: [IndexPath(item: item, section: 0)], with: .top)
}
I am unable to understand how to increase animation time for the cell deletion. Please help me with implementing the same here. Help is much appreciated. Thanks.