@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”上执行错误