我正在从第二个屏幕导航到第三个屏幕,但它显示错误应用程序试图在目标上推送一个 nil View Controller 。这是我用来导航的以下代码,
if (appDelegate.thirdViewController == nil) {
ThirdViewController *sThirdViewController = [self.storyboard instantiateViewControllerWithIdentifier"ThirdViewController"];
[appDelegate setThirdViewController:sThirdViewController];
}
[self.navigationController pushViewController:appDelegate.thirdViewController animated:YES];
好像 AppDelegate 没有引用,
你写过 appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
检查一次..
关于ios - 无法导航到 iOS 9 中的其他屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35481038/
欢迎光临 OGeek|极客世界-中国程序员成长平台 (https://ogeek.cn/) | Powered by Discuz! X3.4 |