我的Swift代码中预期的声明错误

时间:2019-07-07 19:04:30

标签: swift

带有counter = counter + 1的部分中的预期声明

@IBAction func textChange(_ sender: Any) {
    print("you coded a button")
    if iAmADeveloper == false {
        theMessage.text = "I'm an App Developer!"
        iAmADeveloper = true
    }else
     {theMessage.text = "I'm going to be an App Developer!"
        iAmADeveloper = false}
    }counter = counter + 1
    print("counter value is: \(counter + 1)")
    counterDisplay.text = "counter: \(counter)"
}

0 个答案:

没有答案