When you use
, it will not trigger while the user is interacting with a scroll view, or is performing any other touch-tracking interaction. The timer will continue after the interaction has ended. That’s because this convenience method auto-schedules the timer in the
runloop mode, and the default mode doesn’t check the timer during touch interactions.
If you want the timer to continue as normal during touch events, you’d have to init and schedule the timer with
.common mode manually:
RunLoop.current.add(timer, forMode: .common)
@qdoug shared a handy cheat-sheet for remembering which mode to use, as their names are super confusing: