0
我用故事板的第一次和我有SEGUE一個問題,我的故事板是這樣的:SEGUE調用但沒有被解僱
__ ViewController
/
__ TabBarController
/ \__ ViewController
/
-> TableViewController
\
\__ NavigationController ___ ViewController
我創建2 SEGUE,一個TabBarController,一個用於NavigationController使用標識符「AddServer」(用於NavigationController)和「GoMainBoard」(用於TabBarController)。從我TableViewController使用自定義的測試,我火TabBarController或NavigationController與此代碼
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[_tbvDownloads deselectRowAtIndexPath:indexPath animated:YES];
if (indexPath.row == [tableView numberOfRowsInSection:0]-1) {
[self performSegueWithIdentifier:@"AddServer" sender:self];
} else {
...
[self performSegueWithIdentifier:@"GoMainBoard" sender:self];
...
}
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"AddServer"])
{
UINavigationController *navigationController = segue.destinationViewController;
...
}
if ([segue.identifier isEqualToString:@"GoMainBoard"])
{
UITabBarController *tabBar = (UITabBarController *)segue.destinationViewController;
}
}
- (無效)prepareForSegue叫,但我的TabBarController不開除,誰能給我解釋一下,我犯了一個錯誤?謝謝