我正在尝试更新 splitViewController 中的 detailView。这是我尝试的:
//Get the application delegate
AppDelegate *delegate = [[UIApplication sharedApplication] delegate];
//Get the masterViewController
MasterViewController *master = [delegate.splitViewController.viewControllers objectAtIndex:0];
到目前为止,这似乎工作正常。然后我尝试通过这样做来更新 detailViewController 中的标签:
master.detailViewController.myLabel.text = @"someText";
但这不起作用。
那么在detailView中访问outlets的正确方法是怎样的呢?
感谢帮助。