您真的很接近,但是您是否将NIB文件中的视图绑定到视图控制器的视图字段?
编辑:所以视图是连接的,您的代码看起来很好。我刚抽出一段我自己的代码:
>
>/显示主题设置
ThemeController*主题=[[ThemeController alloc]
initWithStyle:uiTableViewStyleGrouped]autorelease];
[[self navigationcontroller]pushviewcontroller:theme animated:yes];
。
是否检查了self.navigationcontrolleris non nil?
在这一点上我会尝试以下几点:
- 只需硬编码视图作为根视图,验证它是否工作
- 在viewWillLoad、viewDidLoad和viewWill中放置两个nslog,它们将出现在客户机视图控制器中。
祝您好运。

编辑:所以视图是连接的,您的代码看起来很好。我刚抽出一段我自己的代码:
// show theme settings
ThemeController * theme = [[[ThemeController alloc]
initWithStyle:UITableViewStyleGrouped] autorelease];
[[self navigationController] pushViewController:theme animated:YES];
你检查过如果self.navigationController非零吗?
在这一点上我会尝试以下几点:
- 只需硬编码视图作为根视图,验证它是否工作
- 在viewWillLoad、viewDidLoad和viewWill中放置两个nslog,它们将出现在客户机视图控制器中。
祝你好运。