iPad: CoreData FetchedRequest Ignores Changes in Predicate
- by Michael
Hi there,
While programming an iPad-app, I'm just running into trouble using a fetchedResultsController with a "dynamic" predicate. it seems the changes to the predicate get ignored. No matter how the predicate changes, I always get the result of the first fetch ...
same code runs without no problems on iphone-env (3.1.x) !!
sample :
- (void)performSearch:(NSString *)searchText {
self.displaySearchResults = TRUE;
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"searchWords contains[cd] %@", searchText];
[self.fetchedSearchResultsController.fetchRequest setPredicate:predicate];
NSError *error = nil;
if (![self.fetchedSearchResultsController performFetch:&error]) {
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
abort();
}
if(deviceIsIPad) {
[self showSearchResults];
}
else {
[cookBookOverview reloadData];
}
}
can anyone help plz ?
btw.: excuse my painful english ;-)