作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想知道如何在我的应用程序最初加载时加载不同的 XIB。现在,当我的应用程序加载时,我只看到黑屏,因为没有 MainWindow.xib。理想情况下,我想加载一个内部有 UINavigationController 的 XIB。有谁知道如何做到这一点?提前致谢!
最佳答案
在 applicationDidFinishLaunching
中,您可能会想到类似的东西
UINavigationController* navigationController = [[UINavigationController alloc] init];
UIViewController *controller = [[UIViewController alloc] initWithNibName:@"First" bundle:nil];
[ navigationController pushViewController:controller animated:NO];
[controller release];
[window addSubview:navigationController.view];
[window makeKeyAndVisible];
当然,这实际上取决于你打算做什么......
关于iOS 开发 : How to Load a Different XIB on Start,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6313658/
我是一名优秀的程序员,十分优秀!