ナビゲーション コントローラが組み込まれたビュー コントローラが 2 つあります。最初のものにはテーブルビューがあります。「AfterTableViewController」という名前の2番目のものには、ラベルがあります。
prepareForSegue
最初のView Controller実装ファイルにあるメソッドで、ラベルを設定できるようにしたいです。
-(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
}
ラベルはどのように設定すればよいですか?