request.fetchLimit = 100;
request.fetchBatchSize = 100;
是否真的使用該函數來限制tableView中有多少行與NSFetchedResultsControllerDelegate?使用NSFetchedResultController如何確保只顯示100行
但問題是..有時表格會顯示100多行,但是當我改變頁面並返回到表格時,表格會顯示100行,它怎麼可能?我不希望該表可以顯示超過100個。
謝謝你的高級。
另一種方法是做
是更新
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];
使得當numberOfObjects大於100,則行數變爲100。然而,與
干擾- (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject
那麼你怎麼做呢?
如果我這樣做,我會崩潰。 –
它干擾更新。 –