不同界面純代碼跳轉(zhuǎn)
@objc func goNextPage(_ sender:Any) {
//拿到ViewController
let nextPage = self.storyboard!.instantiateViewController(withIdentifier: "NextViewController") as! TestViewController
//跳轉(zhuǎn)
self.navigationController?.pushViewController(nextPage, animated: true)
}

屏幕快照 2020-06-15 下午9.28.47.png
storyboard跳轉(zhuǎn)的頁(yè)面要設(shè)置identity里的storyboard ID與之一樣:NextViewController