我正在开发一个包含3个故事板场景的应用程序。在第一个故事板场景中,我有一些我想在其他两个场景中访问的变量。我该怎么做?我使用Storyboard segue导航到其他两个场景,并在按钮上单击
调用以下内容[self performSegueWithIdentifier:@"nameofsegue" sender:self];
答案 0 :(得分:0)
使用此方法
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"nameofsegue"]) {
YourDestinationVC *dvc = [segue destinationViewController];
YourSourceVC *svc = (YourSourceVC*)sender;
//set your ivr here
}
}