我正在使用模板主详细信息应用程序。我已经从 SplitViewController 添加了一个模态序列,并给它一个标识符“DisplayLoginView”。
我从我的 detailViewController 调用以下内容:
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:YES];
[self.splitViewController performSegueWithIdentifier:@"DisplayLoginView" sender:self.splitViewController];
}
我还在 detailViewController 中定义了 prepareForSegue 方法:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
NSLog(@"Source Controller = %@", [segue sourceViewController]);
NSLog(@"Destination Controller = %@", [segue destinationViewController]);
NSLog(@"Segue Identifier = %@", [segue identifier]);
if ([segue.identifier isEqualToString:@"DisplayLoginView"])
{
PrometheusLoginViewController *loginViewController = (PrometheusLoginViewController *)segue.destinationViewController;
loginViewController.delegate = self;
}
}
关于为什么不调用它的任何想法?