You are mixing two different concepts. Instead of
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UIViewController* detailViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"DetailViewController"];
NSMutableString *object = thisArray[indexPath.row];
detailViewController.passedData = object;
[self.navigationController pushViewController:detailViewController animated:YES];
}
You should do something like
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self performSegueWithIdentifier:YOUR_SEGUE_IDENTIFIER sender:self];
}
and then:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:YOUR_SEGUE_IDENTIFIER]) {
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
AthleteDetail *destViewController = segue.destinationViewController;
// set whatever you want here in your destination view controller
destViewController.passedData = object;
}
}
And make sure that your Segue is a Push Segue.