iOS UIWebView: How can I figure out what the previous URL is?

喜欢而已 提交于 2019-12-24 02:39:10

问题


I'm rewriting the goBack function with my own because I need to be able to change the URL depending on whether the orientation changed or not. How can I access the URL history and figure out the previous one?


回答1:


You need to implement the UIWebViewDelegate. It has methods that will allow you to control the back functionality as well as letting you capture the URL when you navigate to it.



来源:https://stackoverflow.com/questions/7958601/ios-uiwebview-how-can-i-figure-out-what-the-previous-url-is

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!