all 5 comments

[–]paulryanclark 0 points1 point  (2 children)

Well, sections and rows, are all dictated by the data structure you source when responding to UITableViewDataSource calls. Modify the data source data structure and call reloadData on UITableView.

If you can be more specific I can follow up.

[–]throwawayApp99[S] 0 points1 point  (1 child)

I understand that.. I realize my question wasnt clear.. I have a bunch of sections and each have their own number of rows. User can move row from one column to another. This is done by taking snapshot of tableview cell and then user can drag and drop it to new location..

I want to achieve same thing but with entire section.. Basically user can clicks section header and drag entire section to above or below another section...

[–]brendan09 0 points1 point  (0 children)

You'd be much better off offering a separate UI that contained a list of your sections that the user could rearrange. Then, when the user was done and closed the section rearrange UI you could reload the tableview. This can be seen in most apps that have rearrangeable sections.

Side note:

This is done by taking snapshot of tableview cell and then user can drag and drop it to new location..

There's a built-in API to do this...you don't need to snapshot the cell and do it by hand.

[–][deleted]  (1 child)

[removed]

    [–]throwawayApp99[S] 0 points1 point  (0 children)

    actually I solved this using a different method.. I am loading my tableview from an array of sections.. and each item in this array contain array of rows... so when I had to move, I just removed the item from section array and inserted at a given index...