there are two view controllers with an embedded navigation controller. the 1st one has a table view. the second one, named "AfterTableViewController" has a label in it.
I wanna be able to set the label, in the prepareForSegue
method which is in the 1st view controller implementation file.
-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
AfterTableViewController *afc = (AfterTableViewController*) segue.destinationViewController;
afc.title = @"the title"; // this works
afc.theLabel.text = @"hello"; // this doesn't work
}
how should I set the label?