UINavigationController 在另一个 nib 文件中开始?
当程序启动时你看到的第一件事是,我成功地设置了一个工作导航控制器,但是当它来自主窗口以外的 nib 文件时,我就失败了。
我希望我的主屏幕与导航控制器没有任何关系,但是当您单击设置按钮时,您将被带到另一个 nib 文件,该文件是根目录,从那里您可以将新的视图控制器推送到它上面 我读过无数的
例子,但它们都专注于从一开始就创建一个导航控制器(在AppDelegate中设置窗口rootViewController),并且我找不到任何适用于我的情况的东西(但看起来像应该很简单!)。
任何关于做什么或去哪里寻找的建议将不胜感激......谢谢。
克里斯
I've been successful in setting up a working navigation controller when it's the first thing you see when the program launches, but I've been unsuccessful when it's from a nib file other than the Main Window.
I'd like my main screen to NOT have anything to do with the navigation controller, but when you click on the settings button, you are then taken to another nib file which is the root and from there you can push new view controllers onto it, etc.
I've read countless examples, but they all focus on creating a navigation controller right from the beginning (setting the window rootViewController in AppDelegate), and I can't find anything that applies to my situation (yet it seems like it should be really simple!).
Any advice on what to do or where to look would be appreciated... thanks.
Chris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需在窗口上添加导航控制器即可。
为此目的,在应用程序委托中创建一个方法并从主视图控制器调用它
Just add the navigation controller on window.
For that purpose create a method in app delegate and call it from your home view controller