Reordering UITableView sections on iPhone by dragging and dropping (e.g. row reordering)

Is there anything currently in the SDK that allows you to reorder tableView sections? As in, move the entire section below or above the neighboring section? This is plausible for individual UITableViewCells. However, they did not see this for sections.

+3
source share
4 answers

Maybe not perfect, but pretty simple, so you should consider: Add up / down buttons to the section headers. Down the first, up the last and up and down all the rest. Then respond to button presses by reordering the table programmatically. Up moves the section up, and down moves the section down. Martin

+4
source

There is no built-in touch API for moving sections of a table view — you will have to do this programmatically and then send a message [tableView reloadData]or the like.

, , UITableViewCell UITableView, , "" UITableViewCells. "" , - , .

+3

, , reloadData , " " (, ?), , . , .

+2
source

I tried to move rows from one section to another, while, of course, updating the data source. But that seemed impossible. The only results I got were empty cells between them, incorrect contents in sections, incorrect ordering of sections.

0
source

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


All Articles