views:

635

answers:

3

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 not the iPad simulator. User Interaction Enabled is also checked.

Any thoughts on why this is happening?

+1  A: 

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.

dwery
+1  A: 

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.

garph0
And yes, as dwery pointed out it could just be a problem with the simulator.
garph0
Thanks dwery and garph0 for your pointers, will investigate them both although I'm leaning towards it perhaps being a glitch. I also noted the UIScrollViewDelegate mentioned in the what's news section but am unsure how this could help here. Here is an example map I found:http://econym.org.uk/gmap/example_map12.htmWhen loaded into a webview in the iPad sim I cannot scroll the map around, the entire view is scrolled instead. I guess I will know for sure if its a simulator glitch when I get my hands on the device proper (not release in AU until then end of the month).
EagleOfToledo
I have access to a device (I do not own one, but a friend of mine does, hand has a provisioning profile).If you want to send me some code reproducing the issue I'll test on the actual device and tell you how's going.
garph0
I really don't know; Good that you found out what wasn't working (even if not why) though :)
garph0
A: 

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.

EagleOfToledo