I have a NSTimer on an interval, and on of the subviews of the controller that contains it is a Table View Controller. When the table is being scrolled the Timer pauses, and resumes after scrolling is complete. It is not a performance issue, it doesn't slow the firing, it completely stops it.
Is this a known issue? Is there a way to prevent this?
The timer never fires at all, or you mean it skips a few fires while you are scrolling?
Does a non-repeating timer still fire after the scrolling stops or does it just never fire at all?
The timer starts firing every .10 seconds as it should after is schedule it with repeats, then while the UITableView is being scrolled it pauses completely. After the scrolling is stopped the timer resumes normally.
Could be a threading issue, how can I put it on its own thread?
This is solution only valid for MAC, but it cannot be used on iPhone because there is no support for other forMode-s (e.g. NSModalPanelRunLoopMode or NSEventTrackingRunLoopMode).
I'm thinking about implement this to my app as well, but kinda lazy. The solution is hook into willDisplayCell: event. Obviously this event will be called everything user scrolling. So just set an NSTimerInterval to indicate last time seen user scrolled. On the Timer itself, check if current time - last seen scrolled > whatever => indicated idle, so fire me. Clear? I don't even know yet. You try it first and let me know if this work....