I need to get the url that a UIWebView is displaying after the user clicks on it once.
I’ve tried putting a button which calls a method which determines the url, under the UIWebView, but this way the button doesn’t work. I’ve tried putting a button over a UIWebView but this way it gives not the url after the click, but the starting url.
Can you help me, please?
Thanks in advance!
The best way to know if somebody has clicked over your view is implementing touchesEnded method:
First declare a rect with the size of your webView in your viewDidLoad for example:
and then implement the touchesEnded:
This way you will know if you have make a touch inside your webView.