Tag: 发件人

不能赋值'colorTouched'是'let'常量

迅速的初学者,按照书并得到错误“” 这里是代码: @IBAction func buttonTouched(sender : UIButton) { var buttonTag : Int = sender.tag if let colorTouched = ButtonColor(rawValue: buttonTag) { if currentPlayer == .Computer { return } //error here: if colorTouched = inputs[indexOfNextButtonToTouch] { indexOfNextButtonToTouch += 1 if indexOfNextButtonToTouch == inputs.count { // 玩家成功地完成了这一轮 if advanceGame() == false { playerWins() } indexOfNextButtonToTouch = 0 […]