我正在尝试呈现一个导航 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/