keeps
2
I am having an error in this function:
setupGame() {
seconds = 30
count = 0
timerLabel.text = "Time: \(seconds)"
scoreLabel.text = "Score: \(count)"
timer = NSTimer.scheduledTimerWithTimeInterval(1.0, target: self, selector: Selector("subtractTime"), userInfo: nil, repeats: true)
}
The coding is exactly as shown in the solution provided.
error is at Selector(“subtractTime”) …
Can you help?
chase
3
keeps, I was having that issue also, but this fixed it.
func setupGame() {
seconds = 30
count = 0
timerLabel.text = "time: \(seconds)"
scoreLabel.text = "score: \(count)"
timer = NSTimer.scheduledTimerWithTimeInterval(1.0, target: self, selector: #selector(ViewController.subtractTime), userInfo: nil, repeats: true)
}
i am getting error, i even tried replacing my view controller file with the file you made available for download still the same error persists
Hi there, great tutorial!
I was just wondering if it would be easy to make the timer start counting down on the first button press.
I’ve tried a few ideas floating around on Google but can’t seem to make them work.
Keep up the great work!