SIGABRT ERROR Swift(Line let currentPlayers)

时间:2018-08-02 21:25:13

标签: swift macos

@IBAction func nameSet(_ sender: Any) {
        if textField.text != "" {
            //let userInput = textName.text

            performSegue(withIdentifier: "currentPlayers", sender: self)
        }



    }
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {

  let currentPlayers = segue.destination *--< Sigabrt Error Thread1*
as!currentPlayersViewController;
        currentPlayers.myString = textField.text!






    }

帮助!谢谢。单击按钮后出现错误,它将执行此错误。我想让播放器在文本字段中输入文本,但在另一个视图控制器上显示文本。当我这样做并进行设置时,它会在“让currentPlayers = segue.destination”上执行错误

0 个答案:

没有答案