I have a tableview which is populated with NSFetchedResultsController. On the Rows are updated in iOS4 and still leaves at their current location, this will not run until the end of the section. Correctly happens The row in IOS5 also updates, but it runs at the end of the section, I want to stop it. How can I do that? And why is this happening? See my code: I think your sortdescriptor is changing when you Update your rows. To fix the list with it and add another sort-descriptor and check it again. I have a very similar problem in my case and it is solving my problem. Maybe yours too, too. didSelectRowAtIndexPath I am updating should not change the current
line sorting here. The difference in the selected row is that I mark it as read. No Title Changes or Nothing
- (NSFetchedResultsController *) fetchedResultsController {if (! __fetchedResultsController = null) {return __fetchedResultsController; } NSFetchRequest * fetchRequest = [[[NSFetchRequest alloc] init] autorelease]; NSEntityDescription * entity = [NSEntityDescription entityForName: @ "EntitySetsCardsInbox" inManagedObjectContext: self.managedObjectContext]; [FetchRequest Set Entity: Entity]; NSPredicate * inboxPred = [NSPredicate predicateWithFormat: @ "archived == 0 and card ID! = 0"]; [FetchRequest setcopy: InboxProp]; If (sortstring == zero) {// sortString = [[NSString alloc] initWithString: @ "Sorting order"]; Sort string = [[NSString alloc] initWithString: @ "color order"]; SortAsc = NO; } If ([sortString isEqualToString: @ "cardTitle"]) {NSSortDescriptor * sortDescriptor2 = [[[NSSortDescriptor alloc] initWithKey: sortString Ascending: sortAsc selector: @selector (localizedCaseInsensitiveCompare :)] autorelease]; NSArray * sortDescriptors = [[[NSArray alloc] initWithObjects: SortDescriptor 2, Zero] AutoExes]; [FetchRequest SetSearch synthesizer: Sort descriptor]; Exclamation (@ "sort descriptor:% @", sort descriptor); } Else {NSSortDescriptor * sortDescriptor2 = [[[NSSortDescriptor alloc] initWithKey: ascending sortString: sortAsc] autorelease]; NSArray * sortDescriptors = [[[NSArray alloc] initWithObjects: SortDescriptor 2, Zero] AutoExes]; [FetchRequest SetSearch synthesizer: Sort descriptor]; Exclamation (@ "sort descriptor:% @", sort descriptor); } NSFetchedResultsController * aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest: fetchRequest managed Objekttonteks: SelfkmanagedObjectContext SectionNameKeyPath zero Kasnam: zero]; AFetchedResultsController.delegate = self; Self.fetchedResultsController = Affected Results Controller; [...]}
Comments
Post a Comment