各セクションに複数のセクションと行があるfetchresultscontroller
個別の結果を返す ( ) を使用しています。NSDictionaryResultType
使うindexPathForSelectedRow
と返ってきますnull
。これが私のコードです:
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"toDetailViewSeg"]){
WLDetailTableViewController *detailController =segue.destinationViewController;
WeightLiftingInfo *theInfo = [[_fetchedResultsController fetchedObjects] objectAtIndex:self.tableView.indexPathForSelectedRow.row];
detailController.muscleGroupInfo = [theInfo valueForKey:@"muscleGroup"];
detailController.specificExerciseInfo = [theInfo valueForKey:@"specificExercise"];
detailController.managedObjectContext = _managedObjectContext;
}
}
正しいインデックス パスを取得するにはどうすればよいですか??