Nick Nick - 10 months ago 40
Swift Question

how to get URL from webview in swift

I am trying to do some sort of web trapping. I have an app that consist of a webview and calls on a mobile website. I want to be able to make the app do a few different things when certain links are hit. For instance, open in Safari or something like this. I was thinking of just doing something like if the url equals go to I am not sure on how to do this or if it will work. If you know how to help or have any resources I haven't been able to find, I would appreciate them.


Well, there is a request property that can be used to get the current request URL. I think you should try to use it.