在scheduledTimer中使用未解析标识符
我已经为此工作了一天,不知道出了什么问题。我已经搜索了这里和文档,仍然找不到答案 代码如下:在scheduledTimer中使用未解析标识符,timer,Timer,我已经为此工作了一天,不知道出了什么问题。我已经搜索了这里和文档,仍然找不到答案 代码如下: `var counter = 60 let timer = scheduledTimer(timeInterval:1.0, target: Any?, #selector(timerAction), userInfo: Any?, repeats: true) func timerAction() { for i in timer { counter -= 1
`var counter = 60
let timer = scheduledTimer(timeInterval:1.0, target: Any?, #selector(timerAction), userInfo: Any?, repeats: true)
func timerAction() {
for i in timer {
counter -= 1
print(counter)
}
}
时间牵引`
任何帮助都将不胜感激