By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,374 Members | 466 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,374 IT Pros & Developers. It's quick & easy.

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

P: 1
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.

Mar 22 '10 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 5,390
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
Mar 25 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.