Is it possible intercept when a user clicks a link in a UIWebView and retrieve the link?
I wish to block the UIWebView from going to the clicked link and do something else.
Thanks in advance.
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.
Yes, look at the UIWebViewDelegate Protocol Reference, specifically
webView:shouldStartLoadWithRequest:navigationType:The
NSURLRequestwill let you know where the link they clicked is going to direct them.You would simply return
NOon this method if you want to prevent the request from loading.