请帮帮我。 有一个带标记的地图,点击它们会显示一个XIB = UIVIew,里面有一个按钮,你需要点击按钮打开viewController
答案 0 :(得分:0)
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: "MarkerVC")
self.navigationController?.pushViewController(vc, animated: true)
答案 1 :(得分:0)
let viewController = YourViewController(nibName: "YourViewController", bundle: nil)
self.present(viewController, animated: true, completion: nil)
如果VC来自XIB,请使用上面的内容。