我如何可以将一个可用的当前行数量存储到一个变量?UITableView在iPhone应用程序 - 如何获得行数
这是我的表的代码(我认为可能是相关的):
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:section];
return [sectionInfo numberOfObjects];
}
对不起,我不明白这个问题。该方法看起来很好,你为什么要改变它?如果你想存储它,为什么不把它存储在伊娃里? – Eiko 2010-12-07 21:24:11
我不确定我是否理解它?!是不是只是在上面的方法中将[sectionInfo numberOfObjects]存储到NSInteger中? – Rog 2010-12-07 21:29:03
是吗?那就是我的答案! – benhowdle89 2010-12-07 21:30:38