开发者

iOS 4 UIWebView Trouble with Javascript

开发者 https://www.devze.com 2023-01-06 10:52 出处:网络
I have code that works great in 3.2 and earlier. The javascript from my UIWebView Load - never seems to execute... Any idea what changed with 4.0 that might cause a problem...?

I have code that works great in 3.2 and earlier. The javascript from my UIWebView Load - never seems to execute... Any idea what changed with 4.0 that might cause a problem...?

  • my current code has a bunch of javascript in the page to load and format - one of the things is a variable that indicates the javascript prep is don开发者_开发技巧e... I am checking that at 0.5 second intervals with a call [webView stringByEvaluatingJavaScriptFromString:@"fsready"]

When that is set to 1 - I proceed... I have tried showing the window etc -- it looks like it never loads. I have taken the html that I am loading and confirmed it all works in Safari -- even mobile safari. Again - running the same thing on 3.2 or earlier works find on the device as well...

Ideas?


we ended up finding that there is an issue with how iOS 4.0 handles the accelerometer. We ended up taking the accelerometer code out of our app.. and everything started working.

0

精彩评论

暂无评论...
验证码 换一张
取 消