I developed a game with HTML + CSS + jQuery. It's a simple Whac-a-mole game, which runs really well on the browser but is stuttering开发者_如何学Go a bit on a UIWebView running on an iPad2.
I'm loading the UIWebView through a simple App I created, which has nothing else but that webview.
I find that the response to touches is quite poor and there's a bit of lag as well.
Do you guys know if there's a way to optimise it?
Any help will be much appreciated.
Cheers
I'm guessing the app runs better in the browser because the browser has the Nitro JavaScript engine. I'm not sure the UIWebView has access to it.
Graphics loading and resizing are often huge performance hits. What if one of the moving graphics needs to be resized constantly? As the comment from Nick says - profile it. Profile the javascript.
精彩评论