Swift:线程 1:在 storyBoard.instantiateViewController 之后发出 SIGABRT 信号

Swift: Thread 1: signal SIGABRT after storyBoard.instantiateViewController

我想将用户切换到另一个页面

我使用这个代码:

let storyBoard = UIStoryboard(name: "Main", bundle: nil)
let vcAboutUs = storyBoard.instantiateViewController(withIdentifier: "ViewControllerIndex") 
self.present(vcAboutUs, animated: true, completion: nil)

但是在 运行 项目之后我得到 Thread 1: signal SIGABRT 错误并且模拟器崩溃了

图片:https://i.stack.imgur.com/d1uIT.jpg

完整代码:

DispatchQueue.global(qos: .background).async {
  let getJsonLogin = GetData()
  let result = getJsonLogin.getJson(urlGet: AppDelegate.ADDRESS+"/index.php", urlData: "mobile="+mobile+"&code="+getCode+"") { result in
  DispatchQueue.main.async {
    if(result == nil){
      self.progressText.text = "Error";
    } else {
      if((result!["error"]!) == "true"){
        self.progressTextCode.text = result!["message"]!;
      } else {
        let storyBoard = UIStoryboard(name: "Main", bundle: nil)
        let vcAboutUs = storyBoard.instantiateViewController(withIdentifier: "ViewControllerIndex") 
        self.present(vcAboutUs, animated: true, completion: nil)
      }
    }
  }
}

您是否将 VC 的名字添加到故事板中?