I want to update status at midnight everyday. but timer is by interval. how can I set the interval by day
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() {
}
No timer needed. Observe the notification