When user swipe the cell I m showing some option. Everything is working fine, When user scroll the table swipe option goes off. I want the same behaviour when I reload the table on data change. How to achieve that. If user has swipe the cell and I reload table , Swipe options are still there.
Asked
Active
Viewed 234 times
0
-
Please add some code, what you have tried. – Sagar Chauhan Sep 13 '19 at 06:40
1 Answers
0
You hide the swiped cell just add this line of code before reloading the table view.
tableView.setEditing(false, animated: true)
Now for enabling the editing, In your cellForAtIndex Path function make a check like
if indexPath.row == array.size {
tableView.setEditing(true, animated: true)
}

Abhishek
- 329
- 3
- 12