gpt4 book ai didi

ios - 如何以模态方式呈现嵌入在导航 Controller 中的 View Controller ?

转载 作者:行者123 更新时间:2023-11-28 08:18:20 26 4
gpt4 key购买 nike

假设我有这些 View Controller :导航 Controller -> vc1 -> vc2 -> vc3

我希望 vc3 以模态方式显示(出现在底部),因此我在 vc2 和 vc3 之间的转折点上选择了“Present Modally”选项。然而,发生的事情是我在 vc3 上的导航栏被隐藏了,而且当我关闭 vc3 时,它会奇怪地转换——它弹出回来(你会从模态视图中看到什么),然后也向左滑动(好像按下后退按钮)。

那么模态呈现的正确方式是什么?我需要将 vc3 放入它的导航 Controller 吗?

最佳答案

在这里引用这个答案,选项 2:Presenting ViewController with NavigationController

很简单,你需要将一个navigationController 嵌入到vc3 中,然后以模态方式呈现导航 Controller 。不过,您需要创建自己的后退按钮。

关于ios - 如何以模态方式呈现嵌入在导航 Controller 中的 View Controller ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41948285/

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