Ios4 PushViewController不工作

Ios4 PushViewController不工作,ios4,uinavigationcontroller,pushviewcontroller,Ios4,Uinavigationcontroller,Pushviewcontroller,我想创建一个基本的推送视图场景。我有以下代码,但它不工作。什么也没发生。有人能告诉我为什么吗 testController *screen2 = [[testController alloc] initWithNibName:nil bundle:nil]; [self.navigationController pushViewController:screen2 animated:YES]; [screen2 release]; 你应该试着做一个NSLog,看看screen2是否为nil。由

我想创建一个基本的推送视图场景。我有以下代码,但它不工作。什么也没发生。有人能告诉我为什么吗

testController *screen2 = [[testController alloc] initWithNibName:nil bundle:nil];
[self.navigationController pushViewController:screen2 animated:YES];
[screen2 release];

你应该试着做一个NSLog,看看screen2是否为nil。由于某种原因,它可能没有从相应的nib中正确加载。顺便说一句,我强烈建议坚持类名大写的惯例。说到这里,您是否调用了nib文件TestController.nib?(这会导致问题。)