Question

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?

Était-ce utile?

La solution 2

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. :-(

Autres conseils

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/

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top