我使用的是WebView组件,有时我会重新加载该组件。但有时,在重新加载之前,我想获取WebView仍然指向的网址。有可能得到这些信息吗??
提前谢谢你。亚历克斯
发布于 2013-04-02 04:22:52
UIWebView *myWebView = // ... well, we'll just say it exists.
NSLog(@"last loaded or currently loading URL: %@", myWebView.request.URL);request是一个NSURLRequest对象,用于请求页面,因此您几乎可以从中获取所需的任何内容。
https://stackoverflow.com/questions/15745619
复制相似问题