【发布时间】:2018-12-12 22:33:51
【问题描述】:
index.swift
func didReceiveNewSession(_ session: QBRTCSession, userInfo: [String : String]? = nil) {
print("Receive")
let mainStoryboard = UIStoryboard(name: "Main", bundle: nil)
let goController = mainStoryboard.instantiateViewController(withIdentifier: "call") as! call
self.present(goController, animated: true)
}
如果我在index.swift 并收到会话,请为我打印Receive 并转到call.swift。
但如果在加载index.swift 后我转到page.swift,如果接收会话,则打印Receive 但不要转到call.swift 并继续page.swift。
如果我在present 之后的任何地方,请转到call.swift
【问题讨论】:
-
很难准确地理解你在这里的要求,你能详细说明一下吗?您只是想以编程方式从与当前正在查看的 VC 不同的故事板中打开 VC?
-
@JustinMiller,是的。我在索引 VC 中编写代码,但我不在索引 VC 中。如果我调用索引代码,不要去另一个 VC
标签: ios swift uiviewcontroller uistoryboard