单个 iPhone 应用程序中有多少个 UINavigationController 对象?
我认为我的设计问题之一是,当我应该只有一个 UINavigationController 和一个委托时,我却不断创建导航对象。这是正确的吗?
我并不担心样式偏好,但我正在寻找的答案更多是关于技术角度和管理多个视图控制器之间的导航。任何指示都非常感谢和认可。
我仍然认为我已经控制了 SDK,然后我又陷入困境。
I think one of my design problems is that I keep creating navigation objects when I should only have one UINavigationController and a delegate. Is that correct?
I not as concerned from a style-preference, but the answer I am looking for is more about the a technical perspective and managing the navigation among several view controllers. Any pointers are very much appreciated and recognized.
I continue to think that I have the SDK under control and then I struggle again.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧……我正在重读 Apple 的开发文档,答案是“通常只有一份,但通常不止一份。”
“iPhone 开发中心:iPhone 操作系统的视图控制器编程指南:简介”
“将导航控制器包含在应用程序的主 nib 文件中是最有意义的。您可以在以下情况执行此操作:导航控制器本身为应用程序窗口提供主视图,或者在导航控制器为选项卡栏界面提供根视图的情况下,尽管您也可以从主 nib 文件(或任何其他 nib)加载独立或模态呈现的导航控制器。文件),这样做并不是最佳选择,在这些情况下,在使用时以编程方式创建导航控制器通常更容易。”
OK ... I am re-reading Apple's Dev Doc and the answer is 'usually only one, but quite often more than one.'
"iPhone Dev Center: View Controller Programming Guide for iPhone OS: Introduction"
"It makes the most sense to include navigation controllers in your application’s main nib file. You do this when the navigation controller itself provides the main view for your application’s window or in situations where the navigation controller provides the root view for a tab bar interface. Although you could also load standalone or modally presented navigation controllers from your main nib file (or any other nib file), doing so is not optimal. In those scenarios, it is usually easier to create the navigation controller programmatically at the point of use."