我的转场被添加到故事板中。我想推送到一个视图控制器,比如 Deep_VC,与故事板中的下一个不同,比如 Next_VC。我正在使用:
Deep_VC *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"DeepVC"];
[self.navigationController pushViewController:controller animated:YES];
它去了那里,但我得到了错误。导航栏磁贴用于 Next_VC,而不是 Deep_VC,并且错误消息:
Finishing up a navigation transition in an unexpected state . . .
Unbalanced calls to begin/end appearance transitions . . .
我的 prepareForSegue 看起来像:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([[segue identifier] isEqualToString:@"toNextVC"]) {
Next_VC *vc = [segue destinationViewController];
vc.receivedData = [NSMutableArray arrayWithObjects:passData, nil];
}
if ([[segue identifier] isEqualToString:@"toDeepVC"]) {
Deep_VC *vc = [segue destinationViewController];
vc.receivedData = [NSMutableArray arrayWithObjects:passData, nil];
}
}
有人可以帮忙吗?