When using Timer
or CADisplayLink
I’m always confused if I want the common or default RunLoop Mode. Summary:
.default
— only runs when touches are not being tracked.tracking
— only runs when touches are being tracked.common
— runs whether touches are being tracked or not
A common bug is that a timer or display link isn’t firing while scrolling. Fix this by changing the run loop mode from default to common.