Reorder sections, rows, and UITableView rows between sections

I am trying to fulfill the following 3 requirements:

  • Display UITableViewthat has content sections.
  • Be able to rearrange table rows between sections.
  • Be able to rebuild partitions, similar to how row rearrangement works.

(Also, I cannot use UICollectionView)

Currently, I can do the first two without any problems. I've been developing iOS for some time, but I'm at a dead end on how to actually rebuild partitions and make it as if you were moving a line.

I tried to make a nested table in UITableViewCelland pretend that the first cell is the "header", but this only works for moving partitions and breaks down the possibility of rearranging rows between partitions (admittedly, I could not go wrong).

I understand that this is a difficult question, but any help would be appreciated - even if the answer is “cannot be completed”.

+5
source share
2 answers

I think the only way to achieve completely free redistribution of rows and sections is to create a fully custom subclass of UIView that looks like a UITableView (or not, if you want), and make efforts to recognize gestures for repositioning. It will not be fast, but it is quite possible.

, , , .

+3

, - , . , , github (https://github.com/shusta/ReorderingTableViewController), " ", iOS . , - . ,

+5

All Articles