这就是我想要做的。
MyViewController *viewController = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil];
UILabel *lblTempStoreNo = [[UILabel alloc] init];
[lblTempStoreNo setText:@"1234"];
viewController.lblStoreNo = lblTempStoreNo;
[activeRouteTicketListView setLblStoreNo:lblTempStoreNo];
[[self navigationController] pushViewController:viewController animated:YES];
[lblTempStoreNo release];
[viewController release];
基本上我在视图控制器中设置标签,我将要推送导航控制器,但该标签的值不会改变:@。我想知道这是否可能?
答案 0 :(得分:0)
您正在更改标签,而不是标签的文本。您的代码不应该是:
viewController.lblStoreNo.text = @“1234”;