I am using a webview and on that web view i have a image. I want to know how i detect touch event of image of webview. I have o open a new view when image is touch.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depending on the content of the webView, you might have success turning the image into a link, then in your UIWebViewDelegate, implement the
webView:shouldStartLoadWithRequest:navigationType:method and check for the image link’s URL using the(NSURLRequest *)requestparameter.If you don’t have control of the webView’s HTML content, but the image does have an ID, you could make it a link using UIWebView’s
stringByEvaluatingJavaScriptFromString:method to run some javascript and “linkify” the image.