Xcode 无法更改视图控制器
Xcode can't change View Controller
let profileViewController =
self.storyboard?.instantiateViewController(withIdentifier:
"ProfileViewcontroller") as! ProfileViewController
self.navigationController?.pushViewController(profileViewController,
animated: true)
不明白,为什么它设置工作。
你能试试初始化故事板吗?
故事板或导航控制器为零。
let storyboard = UIStoryboard(name: "Main", Bundle: Bundle.main)
let profileViewController = storyboard.instantiateViewController(withIdentifier: "ProfileViewcontroller") as! ProfileViewController
self.navigationController?.pushViewController(profileViewController, animated: true)
let profileViewController =
self.storyboard?.instantiateViewController(withIdentifier:
"ProfileViewcontroller") as! ProfileViewController
self.navigationController?.pushViewController(profileViewController,
animated: true)
不明白,为什么它设置工作。
你能试试初始化故事板吗?
故事板或导航控制器为零。
let storyboard = UIStoryboard(name: "Main", Bundle: Bundle.main)
let profileViewController = storyboard.instantiateViewController(withIdentifier: "ProfileViewcontroller") as! ProfileViewController
self.navigationController?.pushViewController(profileViewController, animated: true)