【发布时间】:2016-12-06 08:29:58
【问题描述】:
我需要安排一个计时器来每秒触发一个函数,但我看到在 Xcode 8 beta 3 中,scheduledTimer 仅适用于 iOS 10。
在 iOS 9 或之前的版本中,有没有其他方法可以使用计时器?
Timer.scheduledTimer(withTimeInterval: 1, repeats: true, block: { (timer) in print("Hi!")})
【问题讨论】:
标签: ios swift ios9 ios10 xcode8-beta3