如何在ViewController文件中传递XIB文件数据?

时间:2017-12-18 11:56:02

标签: ios objective-c uitableview xib

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
   [tableView deselectRowAtIndexPath:indexPath animated:YES];
    id object = [DATA objectAtIndex:indexPath.row];
    NSLog(@"CELL^1:%@",object);

    if ([object isKindOfClass:[NSMutableArray class]]) {

        NSMutableArray *dict = (NSMutableArray *)object;
        PartyCodeTF= [NSString stringWithFormat:@"%@",[ dict  objectAtIndex:0]];
        PartyNameTF= [NSString stringWithFormat:@"%@",[ dict  objectAtIndex:1]];
        PartySNameTF= [NSString stringWithFormat:@"%@",[ dict  objectAtIndex:2]];
        OpeningTF= [NSString stringWithFormat:@"%@",[ dict  objectAtIndex:3]];
        ContactNoTF= [NSString stringWithFormat:@"%@",[ dict  objectAtIndex:4]];

    }
    PartyVC *loading=[[PartyVC alloc] initWithNibName:@"PartyVC" bundle:nil];
    loading.delegate=self; // protocol listener
    loading.PartyCode= PartyCodeTF;
    loading.PartyName= PartyNameTF;
    loading.Opening =OpeningTF;
    loading.PartySName=PartySNameTF;
    loading.ContactNo=ContactNoTF;
    loading.Track_1=@"2";
    [self.navigationController pushViewController:loading animated:YES];
    [self performSelector:@selector(closeButton_Click:) withObject:self];
}

我的XIB文件包含UITableview。 点击UITableviewCell关闭xib文件并将数据传递给PartyVC textfields时。 self.navigationController pushViewController给出错误 对于财产

  

找不到navigationController。

请帮助我......提前谢谢。

0 个答案:

没有答案
相关问题