Reputation: 4833
I am looking for a way of being able to reorder whole sections (including the rows within in) in a UITableViewController. My searches have led to this...
Reordering UITableView sections on the iPhone by dragging (like reordering rows)
which suggests that this isnt possible 'out of the box' so I am trying to establish a way of doing it.
One idea I had was to nest UITableViews so there would be a 'Master' UITableView which in each cell had a new UITableView. These 'slave' UITableViews would effectively just have cells for each section.
THe theory being that on the Master TableView, you could reorder cells as normal, it just so happens that it contains a whole set of cells.
To the extent it matters...My implementation of this would need a changeable number of sections and each section would have a variable number of rows.
Does anyone have a view on whether this is possible/would work?
Thoughts/advice appreciated
Upvotes: 2
Views: 239
Reputation: 18497
Starting in iOS 5, you can move whole sections via the moveSection:toSection:
API.
Upvotes: 4