1

尝试在 UITableView 到 UIViewController 之间传递一些数据时出现问题。我在谷歌和stackoverflow中寻找,但没有成功。

这里 NSLog 正在打印我想要的

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    DetalhesPosto *detalhesPosto = [[DetalhesPosto alloc]init];

    detalhesPosto.aliasPosto = alias;

    NSLog(@"%@",detalhesPosto.aliasPosto);

    [self.navigationController pushViewController:detalhesPosto animated:YES];

    [detalhesPosto release];

}

当 navigationController 调用视图 detalhesPosto 时有一个代码:

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.


    labelAliasPosto.text = [NSString stringWithFormat:@"%@",aliasPosto];

    NSLog(@"YES or NO ? %@",aliasPosto);
}

但是 NSLog 正在打印 => 2012-11-06 18:48:58.061 MAP[7006:f803] YES 还是 NO?>

你能阻止我吗?

Tks 保罗

4

0 回答 0