request.fetchLimit = 100;
request.fetchBatchSize = 100;
is it true use that function to make limit for how many rows at tableView with NSFetchedResultsControllerDelegate?
but the problem is.. sometime the table will show more than 100 rows, but when I change the page and back to the table, the table will show just 100 rows, how can it be? I don’t want the table can show more than 100.
thank you in advanced.
Another way to do it is to do
is to update
id <NSFetchedResultsSectionInfo> sectionInfo = [[self.FetchController sections] objectAtIndex:section];
CalledRowCountingNotYetCallRowForSection=true;
[self.tableViewA setBounces:YES];
if([sectionInfo numberOfObjects]>100){
//[Timer searchCriteriaChanged];
CLog(@"Something Wrong This NumberOfRow: %d", [sectionInfo numberOfObjects]);
}
else{
}
return [sectionInfo numberOfObjects];
so that when numberOfObjects is bigger than 100, then the number of row becomes 100. However, that interfere with
- (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject
So how do you do it?
You could limit the amount of available rows by overriding the numberOfSectionsInTableView and numberOfRowsInSection functions of your table view data source, returning 1 and 100, respectively.
Are you using a SQLStore as base for your table? According to apple documentation ( http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/CoreDataFramework/Classes/NSFetchRequest_Class/NSFetchRequest.html#//apple_ref/doc/c_ref/NSFetchRequest ), fetchLimit does only work for SQL stores.