I’m looking for a way to listen for an action in a UIWebView. For example: When I tap a link or button inside a UIWebView, I want to call up a new native component, like a comment page. Or. take some other action like change a navigationBar item.
Share
Yes you can do this. Implement
This delegate . This method gets called whenever your webview is about to make a request. So now when someone clicks a button or hyperlink on your webpage, you will get a call to this method. After you catch this call, you can choose to do whatever you want with it. Like redirect the link through your own servers, or log a request to your server about user activity or in your case bring up comments page or change nav bar etc.
Example – here you are trying to intercept any links clicked on your webpage & pass it through
myMethodActionfirst.Hope this helps…