gpt4 book ai didi

ios - 如何使用 UIViewController Containment 为 rootViewController/topViewController 创建 socket

转载 作者:行者123 更新时间:2023-11-29 03:45:07 24 4
gpt4 key购买 nike

当创建自己的UIViewController容器时,是否可以为容器的rootViewController或topViewController提供导出。使用UINavigationController,您可以在 Storyboard中设置rootViewController。我想知道在创建我们自己的 UIViewController 容器时,我们是否可以以某种方式做到这一点?谢谢。

最佳答案

我不确定你所说的 rootViewController/topViewController 是什么意思——你的意思是你添加为 subview Controller 的那个(或者如果是IB的话,如果你在 Storyboard中使用容器 View ,那么会自动嵌入的那个) )?如果这就是你的意思,则无法在 IB 中为其创建一个导出,但你可以在代码中为其创建一个属性并将其设置为 self.ChildViewControllers[0] (假设你只有一个 child )。

关于ios - 如何使用 UIViewController Containment 为 rootViewController/topViewController 创建 socket ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17849035/

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