gpt4 book ai didi

objective-c - 两个导航 Controller (在 Storyboard 中)

转载 作者:搜寻专家 更新时间:2023-10-30 19:46:21 24 4
gpt4 key购买 nike

所以我是 Objective C/iOS 等的新手……我想做一些非常简单的事情。我想要一个登录 View ,一旦完成,我就会到达我的应用程序 [HomePage in the image] 的“Main”。在那个主页中,我想要一个“全新的”导航 Controller ,并且主页是根。

现在,如果我想从 Login 转到 Home,我必须在 Login Controller 的左侧有一个 Navigation Controller。如果我这样做,主页将有一个返回登录屏幕的按钮,我不希望那样。如果可能,我想删除那个登录 View 。除非用户单击“注销”,否则我将不再需要它。

基本上我的问题有两个步骤: enter image description here1) 如何为新的 View Controllers/View 流设置 Navigation Controller 并删除现在无法访问的旧集合。

2) 由于没有 .xib 文件(因为 Storyboard),我如何在 View 之间切换?谢谢!

最佳答案

Login ViewController 之前,您无需打开 Navigation Controller。您可以按以下方式进行:

Login ViewController
|
| (segue type = modal)
|
\|/
Navigation Controller
Main ViewController

关于objective-c - 两个导航 Controller (在 Storyboard 中),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13391191/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com