UIWebView Activity (e.g. JS/CSS/GIF Animation) is Paused During Scrolling/Tracking

714 views Asked by At

In my native iOS app I am using UIWebView's to display rich HTML content that includes CSS animations and animated GIFs etc.

However whilst the UIWebView is scrolled any CSS animations or GIF animations are paused until the scrolling comes to rest again.

I expect this has something to do with NSRunLoopModes. Is there any way to avoid this behaviour?

2

There are 2 answers

0
Oliver Pearmain On BEST ANSWER

Interestingly enough upon further investigation the exact same thing happens in Safari when opening web sites with animations (didn't realise this earlier).

I can only draw the conclusion that webpages are deliberately paused to ensure scroll performance and there is probably nothing that can be done about this. :-(

0
TomSwift On

In iOS8 animations don't stop in Safari while scrolling. They do in a UIWebView. But my guess, based on the article below is that they will continue to animate in a WKWebView.

http://developer.telerik.com/featured/scroll-event-change-ios-8-big-deal/