gpt4 book ai didi

ios - 呈现 navigationController 时出错

转载 作者:行者123 更新时间:2023-11-30 13:55:53 27 4
gpt4 key购买 nike

我正在尝试呈现一个导航 Controller ,它似乎可以工作并呈现导航 Controller 。但是,即使它有效,我仍然不断收到错误?

我的代码

let vc = storyboard.instantiateViewControllerWithIdentifier("AdViewController") as! UINavigationController
let adController = vc.viewControllers.first as! AdViewController
adController.adObject = contentObject
self.presentViewController(vc, animated: true, completion: nil)

警告:

Warning: Attempt to present <UINavigationController: 0x1508fea00> on <Kodinh.NewsViewController: 0x1511774a0> whose view is not in the window hierarchy!

最佳答案

当您调用“self.presentViewController”时,请确保“self”可见,警告将会消失。

关于ios - 呈现 navigationController 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33632096/

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