📜  swift setinterval - Swift 代码示例

📅  最后修改于: 2022-03-11 15:00:59.408000             🧑  作者: Mango

代码示例1
var helloWorldTimer = Timer.scheduledTimer(timeInterval: 60.0, target: self, selector: #selector(ViewController.sayHello), userInfo: nil, repeats: true)

 @objc func sayHello() 
 {
     NSLog("hello World")
 }