iOS UIWebView:如何确定以前的URL是什么? [英] iOS UIWebView: How can I figure out what the previous URL is?

查看:72
本文介绍了iOS UIWebView:如何确定以前的URL是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要用自己的方法重写goBack函数,因为我需要能够根据方向是否更改来更改URL。如何访问URL历史记录并找出前一个?

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?

推荐答案

您需要实现UIWebViewDelegate。它具有允许您控制后退功能以及在导航到URL时捕获URL的方法。

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.

这篇关于iOS UIWebView:如何确定以前的URL是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆