This is what I am trying to do.
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];
Basically I am setting the label in the view controller which I am about to push on navigation controller, but the value of that label is no开发者_运维知识库t changing :@. I was wondering if this is even possible?
You are changing the label, and not the text of the label. Shouldn't your code be:
viewController.lblStoreNo.text = @"1234";
?
精彩评论