I have a plist in my app that contain rows in the Root Dictionary , when i add this rows in NSMutableArray by the following code:
NSString * item = [badgeDict objectForKey:[NSString stringWithFormat:@"item%i",indexPath.row+1]];
[badgeArray addObject:item];
It gives me scrambled sorted array…
I wanted it to be in the same order… putting in mind that the key of those rows called (item1,item2,item3…,etc)…
How it should be fixed?
Yes it will be scrambled since your code is in cellForRowAtIndexPath.
UITableViewCells are cached. Since you didnt show the relevant surrounding code, its pretty likely that you are redisplaying cached cells.