I have created a reorder-able UITableView
. I am loading data from Realm, and showing that data into UITableView
. My UITableView
has Section and rows.
now User can hold Any cell in any section and can reorder them in 2 ways
- User can reorder cell with in the same section.
- User can reorder cell across the different section.
What I need:
Once the user has made the order he should see same item in same order when he come back to App. For any type of reordering I have to do indexing. But I do not have clue how to reorder them in database.
My Idea to resolve the requirement
My idea is to include the String type value in the Model where I can replace something like (1,10) that will indicate section 1, row 10.
But I do not have idea how to tackle this and how to save the reordering as i need here. Any idea about that?? please share