gpt4 book ai didi

ios - 在给出退出操作时,unwind segue 不会出现在界面构建中

转载 作者:行者123 更新时间:2023-11-29 05:49:31 26 4
gpt4 key购买 nike

在我的 Xcode 界面生成器中,我没有找到 unwind-segue 退出操作。这种情况下有什么问题吗?

attached image for more information

最佳答案

退出面板中可用的 Segue 列表是根据您在其他 View 中定义为 @IBActions 的展开 Segue 来填充的 Controller ,例如:

@IBAction func unwindFromExampleViewController(segue: UIStoryboardSegue) {
}

这告诉 iOS 包含此操作的 UIViewController(我们称之为 ViewControllerA)已准备好处理屏幕截图中的 UIViewController (ViewControllerB) 的展开。

您在另一个 VC 中实现过这样的操作吗?一旦您完成此操作(在一个或多个 VC 中),您就可以从 ViewControllerB 的退出选项列表中选择“unwindFromExampleViewController”。

仅供引用:如果需要,您可以在多个 VC 中定义相同的展开操作; iOS 会在被调用时选择“最近”的一个来放松。

您可以在 this question here 中找到有关使用展开转场的更多详细信息.

关于ios - 在给出退出操作时,unwind segue 不会出现在界面构建中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55822533/

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