【发布时间】:2018-05-07 11:13:18
【问题描述】:
我使用了下面的代码。导航,但我已经尝试了所有可能的想法,我必须导航回来,但我总是收到错误。像 警告:尝试显示其视图不在窗口中。使用下面的代码时,最好的导航方式是什么?还是去另一个视图?
if let vc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "ScoreViewController") as? ScoreViewController
{
present(vc, animated: true, completion: nil)
}
【问题讨论】:
-
如果你想浏览你以前的 VC,那么只需使用
dismiss(animated: true, completion: nil)
标签: ios swift navigation