How do I create a NSTimer on a background thread?

If you need this so timers still run when you scroll your views (or maps), you need to schedule them on different run loop mode. Replace your current timer: [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(timerFired:) userInfo:nil repeats:YES]; With this one: NSTimer *timer = [NSTimer timerWithTimeInterval:0.5 target:self selector:@selector(timerFired:) userInfo:nil repeats:YES]; [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; For details, check this … Read more

Understanding NSRunLoop

A run loop is an abstraction that (among other things) provides a mechanism to handle system input sources (sockets, ports, files, keyboard, mouse, timers, etc). Each NSThread has its own run loop, which can be accessed via the currentRunLoop method. In general, you do not need to access the run loop directly, though there are … Read more

tech