2010-06-15 48 views
0

我想推UIViewController与UINavigationController。 它可以在4.0以前的任何SDK中完美工作,但它在4.0中不起作用。UINavigationController在4.0崩溃 - 不是<-4.0

我收到了OBJC_MSG_SEND(EXC_BAD_ACCESS)错误。 UIViewController不是零,也不是self.navigationController。

我试过NSZombieEnabled,但没有显示出来。

UINavigationController作为控制器的一个视图在UITabBarController下运行。这一切都是在MainWindows.xib中设置的。

对于什么是错误的任何想法?这让我疯狂。

+0

很难说我们何时无法看到上下文中的代码。 – jer 2010-06-15 10:53:07

+0

使用调试模式,它会立即停止在正确的代码行中。 – Eiko 2010-06-15 10:54:33

回答

0
UIViewController *myViewController = [[UIViewController alloc] init]; 
[self.navigationController pushViewController:myViewController animated:YES]; 

希望这会起作用!

相关问题