小编Ken*_*Chu的帖子

每天午夜运行代码

我想每天午夜更新状态。但计时器是按时间间隔的。如何按天设置间隔

var timer = Timer()

timer = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(timerAction), userInfo: nil, repeats: true)

// called every time interval from the timer
func timerAction() {

}
Run Code Online (Sandbox Code Playgroud)

macos timer swift

3
推荐指数
1
解决办法
1758
查看次数

标签 统计

macos ×1

swift ×1

timer ×1