IOS code

passing data while segue

 [self performSegueWithIdentifier:@"traddetail" sender:self];

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    if ([segue.identifier isEqualToString:@"traddetail"]) {
        
        NSIndexPath *indexPath = [self.tableview indexPathForSelectedRow];
        PartialResult *r = [self.partialresults objectAtIndex:indexPath.row];
        UINavigationController *navTmp = segue.destinationViewController;      
        DetailTableViewController * myNewVC = ((DetailTableViewController *)[navTmp topViewController]);