模拟器 从一个viewController跳转到另一个viewController后黑屏,方法是:
1. 在storyboard里给跳转的viewController加上StoryboardID:
2.代码如下修改
let controller = self.storyboard?.instantiateViewController(withIdentifier: String(describing: type(of: ViewController2())))
as! ViewController2
self.navigationController?.pushViewController(controller,animated: true)