gpt4 book ai didi

ios - 选项卡栏 Controller 问题内的 UI 导航 Controller

转载 作者:行者123 更新时间:2023-11-29 00:56:33 24 4
gpt4 key购买 nike

我当前的 Storyboard如下所示:Click here to see screenshot

问题是我不知道“登录 View Controller ”应该与其他 View 有什么关系。结果,当我构建项目时 - “View Controller”以黑色空隙出现,Click here to see what I mean .

最佳答案

单击您的 tabBarController 并输入标识符,例如您的 VCID

enter image description here

然后你可以像这样访问你的 View Controller :

let controller = self.storyboard!.instantiateViewControllerWithIdentifier("yourVCID") as! UITabBarController

//上一行将为您提供 ID 为“yourVCID”的 View Controller 的地址(引用)。这是你想去的地方。这里的 self 是登录 View Controller (从你想去的地方)。 StoryBoard 是包含 self 所代表的 View Controller 的 Storyboard。

self.presentViewController(controller, animated: true, completion: nil)

//上一行将呈现 Controller ,在这种情况下,该 Controller 将源自自身(登录 View Controller )

这将自动显示标签栏 Controller 的主屏幕( View Controller )

关于ios - 选项卡栏 Controller 问题内的 UI 导航 Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37574321/

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