【发布时间】:2011-11-05 18:50:35
【问题描述】:
在应用程序委托中,在 didFinishLaunchingWithOptions 函数中,我有以下代码来加载 UINavigationController 视图:
UINavigationController *navcon=[[UINavigationController alloc] initWithNibName:@"ThirdView" bundle:[NSBundle mainBundle]];
FirstView *fv=[[FirstView alloc] init];
[navcon pushViewController:fv animated:NO];
[fv release];
[self.window addSubview:navcon.view];
[self.window makeKeyAndVisible];
return YES;
.xib“ThirdView”,即 UINavigationController 视图,在 Interface Builder 中实际上是这样的:
但是当我运行应用程序时,应用程序看起来像这样:
为什么应用程序没有像我在 Interface Builder 中设计的那样加载“ThirdView.xib”UINavigationController 的导航栏设计?
更新:这是“FirstView”在 IB 中的样子:
【问题讨论】:
标签: objective-c ios uinavigationcontroller interface-builder