views:

24

answers:

1

my UITableView is reordering the results after you navigate away and them come back to the view. it only does it one time though - if you navigate away and then come back a second time the new order doesn't change.

does anyone know what could be causing this?

thanks for any help.

A: 

i fixed this issue by putting this code in my viewWillAppear: method.

if (self.resultsController != nil) {
   return;
}

I'm not sure why it worked. I noticed that it was missing when i compared it to other code I had.

hanumanDev
does the re-ordering of the tableviewcell cause the data to change in a way that would cause your resultset to ordered differently? if so when do you save the change? what happens when you close the app? are the results returned in the old order or new order?
falconcreek
This suggest that the reordering was caused by the creation of a new fetched results controller when the view reappeared.
TechZen
thanks for the comments.
hanumanDev