How to find an image based upon an x-y screen coordinate

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • svjim
    New Member
    • Mar 2010
    • 1

    How to find an image based upon an x-y screen coordinate

    I am working on an iPhone application which uses a version of safari (UIWebView) to display web pages. I want to be able to capture images shown on the webview. To do so, I can capture a "touch event" which will give me an x-y coordinate. To find the correct image, I need to be able to scan all the image tags in the web page and determine which image tag encompasses the point captured from the iphone touch event.

    It turns out that the ability to execute a java script against the html page is provided in the UIWebView, so if a javascript procedure can either find the image based upon an inputed point or return a list of the images with x-y point locations and their height and widths, I should be able to do what I want.

    Your help is much appreciated.

    Jim
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    never developed something for the iPhone but i think your approach seems a bit weired ... just bind the events to the page's elements itself ... probably this link helps ...

    kind regards

    Comment

    Working...