それに応じて関連データを渡すことができるようにindexPath
、私の選択行を決定しようとしています。UITableView
現在、0
どのセルを選択してもログを記録し続けます。理由はありますか?(はい、IBOutlet
テーブルの は正しく接続されています)。
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"patientChart"])
{
UITabBarController *tabBar = (UITabBarController *)segue.destinationViewController;
PatientChartViewController *vc = [tabBar.childViewControllers objectAtIndex:0];
NSIndexPath *path = [self.appointmentTableView indexPathForSelectedRow];
vc.appointmentDictionary = [self.appointmentArray objectAtIndex:path.row];
}
}