Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Darkroom

Guest
Original poster
i'm building a sound engine entirely based on OpenAL for portability. there are lots of controls and settings within my example UI so i've place everything in a scrollView. i've noticed that during any of my sound animations (panning, vibrato, etc.), which rely heavily on repetitive timers, the timers stall if i begin scrolling. scrolling kills my sound animations. to be clear, scrolling only seems to pause my timers, which will continue from where they were paused when scrolling stops.

i'm not planning on using a UIScrollView in a published app, but i still find this to be a bit on the ridiculous side of things. 🙄

any thoughts? workarounds?
 
The UIScrollView will be pausing the main run loop as it processes the UI interaction (it may well be starting it's own run loop for that). This will cause your timers to "stall" as they are also fired off the main run loop.

Possible solution: create your own run loop running on a separate thread and schedule the timers on that run loop.
 
oh right! i never though about the main run loop. thanks. and using NSRunLoopCommonModes works perfectly.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.