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]);
  
        //NSString *mess = [r toString];
        //NSLog(@"passing %@",mess);
        myNewVC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
        myNewVC.nid = r.nid;
        myNewVC.type = r.type;
        myNewVC.title = r.title;

    }
}