我有一个应用程序,与核心数据的工作。数据有一个日期字段,我想在一个单独的部分显示每个月的每个条目。CoreData和的UITableViewController问题
如何真正得到的数据?我使用NSFetchedResultsController来获取数据,并使用此:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
id <NSFetchedResultsSectionInfo> sectionInfo = [[_fetchedResultsController sections] objectAtIndex:section];
return [sectionInfo numberOfObjects];
}
让行和这样的:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
MyInfoObject *info = [_fetchedResultsController objectAtIndexPath:indexPath];
}
让我的实际数据对象。
感谢
你可以添加你如何设置读取的结果控制代码的时候请确保您设置sectionNameKeyPath?这是部分设置的地方。 – 2010-06-01 20:43:39