I have a Timer that I want to continuously repeat at a given interval, however the only way I can seem to get the Timer to persist is by adding it to RunLoop.main like below:
let timer = Timer(timeInterval: timeInterval, repeats: true) { (timer) in
blockToFire()
}
RunLoop.main.add(timer, forMode: .commonModes)
I understand that using .commonModes should prevent the timer from missing its cue when a user interacts with the UI, but will the timer cause problems being added to the main run loop? Will there be UI slow downs?