您的位置:首页 > 移动开发 > Swift

Swift - 跳转ViewController黑屏解决方法

2017-08-23 21:56 253 查看
模拟器 从一个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)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐