警告:在演示文稿进行时尝试在<uinavigationcontroller>上显示<assessnow.gettestviewcontroller>

时间:2017-08-21 08:26:29

标签: ios swift swift3 uinavigationcontroller presentviewcontroller

我想知道导航控制器的行为,因为我搜索了很多东西并试过但没有得到导航控制器的堆栈。我在流行音乐和演奏中有点混淆并推向导航控制器。

所以我正在做的是展示另一个ViewController:

self.navigationController?.pushViewController(controller, animated: true)

我将从该视图转到我的HomeViewController:

 _ = self.navigationController?.popViewController(animated: true)

我正在尝试打开另一个ViewController:

let getTestViewController = self.storyboard?.instantiateViewController(withIdentifier: "GetTestViewController") as! GetTestViewController
    getTestViewController.modalPresentationStyle = .overCurrentContext
    getTestViewController.modalTransitionStyle = .crossDissolve
    self.navigationController?.present(getTestViewController, animated: true, completion: nil). 

但是我收到了这个警告:

"Warning: Attempt to present <Assessnow.GetTestViewController> on <UINavigationController> while a presentation is in progress". 

我在下面看到链接并试过但没有达到。

Attempt to present UIViewController while a presentation is in progress!-Warning

ios7 - Warning: Attempt to present UINavigationController on UINavigationController while a presentation is in progress

我想知道为什么我会收到此警告,如何解决此问题。

0 个答案:

没有答案