【发布时间】:2025-12-11 13:00:02
【问题描述】:
我有一个推送新视图控制器的导航控制器。它在 iOS6 中运行良好,但在 iOS5 中运行不正常。顺便说一句,我在 iPhone 模拟器上运行。
我的代码如下所示:
myViewController *newView = [[myViewController alloc] initWithNibName:@"myViewController"
bundle:nil];
[[self navigationController] pushViewController:newView animated:YES];
也试过了:
myViewController *newView = [[myViewController alloc] initWithNibName:@"myViewController"
bundle:[NSBundle mainBundle]];
[[self navigationController] pushViewController:newView animated:YES];
不工作。
尝试了以下解决方案:pushViewController Not Working on iOS 5 (OK on iOS 6)。
也没有显示新的视图控制器,需要一些指导。谢谢。
【问题讨论】:
-
在 iOS 5 上检查您的 navigationController 是否不为零。
-
它不是零。刚刚检查...
-
在 iOS5 中不能正常工作是什么意思?是不是崩溃了??
-
没有崩溃..只是不去新的视图控制器......
-
只要看看这个答案 *.com/a/13716359/1443976
标签: ios ios5 ios6 uinavigationcontroller