开发者

iPad Simulator WebView/Google Maps API Issue

I've only recently updated XCode to 3.2.2 and started to play with the iPad simulator.

I am having an issue with a WebView. I am using it to load a url with a Google Maps API implementation. The map loads and displays properly but when I try and click and drag on it to pan the map around instead of the map being panned the whole webview is scrolled vertically, revealing the dark grey background. When I release it it bounces back into place.

Also when I hold the option key down to pinch the map it does not respond. If I load the map.google.com page the map pans just fine and is responsive, but not my one. No special code here, just the usual NSUrlRequest. It works fine in the iPhone simulator, but no开发者_如何学Pythont the iPad simulator. User Interaction Enabled is also checked.

Any thoughts on why this is happening?


This looks like a glitch in the simulator.

I'd suggest to:

  • try an older or newer version of the ipad simualtor
  • try the iphone simulator to see if the problem persists
  • try on a device

you might eventually share with us the URL and the other code so we might check if there are obvious troubles.


It seems that the webView is not passing events to the page content.
Since it works ok in iPhone simulator, I would check if somewhat changed in UIKit from OS 3.1.3 to OS 3.2
What's new in iPhone OS 3.2 should be a good starting point, and also the API differences list should be useful.
I saw, for instance that UIWebView is implementing a new protocol in OS 3.2:

 UIScrollViewDelegate
that was not present in OS 3.1.3. That could be some It's not much of a solution, I know, but it's in this direction that I would investigate.


This issue appears to have been fixed in Xcode 3.2.3 but anyone using 3.2.2 who experiences this issue may also be able to solve it by adding this HTML5 meta tag:

<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />

to the head section of their HTML.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜