gpt4 book ai didi

ios - 呈现 ViewController 的 Xcode 问题

转载 作者:行者123 更新时间:2023-11-29 02:39:31 27 4
gpt4 key购买 nike

我有一个非常烦人的问题。我有两个 View Controller 。我只是称它们为 ViewController 和 SecondViewController。它们未链接到 UINavigationController 中。当我呈现 SecondViewController 时,我没有收到任何错误。现在我回到 ViewController。当我现在调用 SecondViewController 时,出现两个错误:

Presenting view controllers on detached view controllers is discouraged <ViewController: 0xadd5220>.

*** -[SecondViewController isKindOfClass:]: message sent to deallocated instance 0x16bc1e30

我使用自定义转场,但是当我使用模态转场时也是一样

你能帮帮我吗?

问候珍妮丝

最佳答案

当您返回 ViewController 时,您的 SecondViewController 实例似乎已经消失。确保在调用它出现之前再次实例化它。

关于ios - 呈现 ViewController 的 Xcode 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25963342/

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