Stop one cell in a UITableView from editing

I have a UITableView with cells.

The table view shows a list of downloaded video files. If a video file is uploaded, I want them to be able to delete it by sliding, i.e.: Delete a row in the table, deletes the file. Then the table view is reset to show "choose to download video."

However, unloaded files obviously cannot be deleted. How can I turn off the “slide to delete” in THESE FAST Cells?

thank

+3
source share
1 answer

You can try: -[UITableViewDataSource tableView:canEditRowAtIndexPath:]
and optionally:-[UITableViewDelegate tableView:editingStyleForRowAtIndexPath:]

; -)

+3
source

Source: https://habr.com/ru/post/1763407/


All Articles