如果我想要 UINavigationController 功能而不需要导航控制器,该怎么办?
我知道 UINavigationController 有很好的视图推送方法。但假设我不想使用 UINavigationController,因为我不希望屏幕顶部有栏。有没有一种特定的方法可以根据我的需要推送和弹出视图?
另外,什么时候应该使用presentModalViewController,什么时候不应该使用?
谢谢, 安东尼
更新:
向视图添加子视图怎么样?
I know that a UINavigationController has good view pushing methods. But let's say that I don't want to use a UINavigationController because I don't want the bar on the top of the screen. Is there a specific way to push and pop views as I want them?
Also, when should I use presentModalViewController and when shouldn't I?
Thanks,
Anthony
UPDATE:
What about adding a subview to a view?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您始终可以
通过 IB 使用或设置它。
如果您有深度为 2 或以上的导航结构,那么使用 UINavigationController 对象总是正确的,但是当您只有两个相关视图且其中一个视图补充另一个视图时,您可以使用模态视图控制器。
You can always use
or set it via IB.
If you have a navigation structure of depth 2 or more, it is always right to use a UINavigationController object but when you have only two related views where one of them supplements the other, you can use a modal view controller.