views:

165

answers:

1

Hi Guys,

I'm trying to enable my UITableView for being able to change the Index of values. Means that I have currently 6 values within an NSMutableArray which actually fills the UITableView.

The user is already able to change the position of the Entries of the UITableView/MSMutableArray.

As long as the application runs, the index change will remain. When the user quits the App and enters it again, that the old Index is back again and the change is undone.

Actually I know why this is happening but can't think of a solution for this...

    myData = [[[NSMutableArray alloc] initWithObjects:@"value1", @"value2", @"value3", @"value4", @"value5", @"value6", nil] retain];

So all the values will be set at their Indexes again as soon as the App gets startet. So how can I manage that if the user changes the index for one special value, this index will remain and not be undone?

One example: Table: value 1 value 2 value 3 value 4 value 5 value 6

user changes the index to: value 1 value 6 value 2 value 3 value 4 value 5

App gets restartet and the original index is back again: value 1 value 2 value 3 value 4 value 5 value 6

Thank you very much for your support!