我正在尝试在代码中进行搜索。prepareForSegue 函数运行并显示正确的目标视图控制器,但没有任何反应。关于我缺少什么或配置错误的任何想法?
查看控制器可能的路径:
A ->B (sgueResultat)
or
A->C (sgueStopSplash)
选择segue的代码:
if (proversion)
[self performSegueWithIdentifier:@"sgueResultat" sender:self];
}
else {
[self performSegueWithIdentifier:@"sgueStopSplash" sender:self];
}
`
我可以确认的 prepareForSegue 由 NSLog 运行:
- (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
NSLog(@"Source Controller = %@", [segue sourceViewController]);
NSLog(@"Destination Controller = %@", [segue destinationViewController]);
NSLog(@"Segue Identifier = %@", [segue identifier]);
nslog 输出:
2012-06-26 22:22:26.002 ClosetV2[2333:fb03] Source Controller = <ABStartViewController: 0xeb12270>
2012-06-26 22:22:26.002 ClosetV2[2333:fb03] Destination Controller = <SplashAfterStopViewController: 0x6b2c9e0>
2012-06-26 22:22:26.003 ClosetV2[2333:fb03] Segue Identifier = sgueStopSplash
2012-06-26 22:22:26.003 ClosetV2[2333:fb03] sgueStopSplash
问候安德烈亚斯