gpt4 book ai didi

ios - iOS-UIWebView-URL的奇怪连接

转载 作者:行者123 更新时间:2023-12-01 19:02:03 25 4
gpt4 key购买 nike

我有一个UIWbView,并使用编码的网址加载它:http%3A%2F%2Fwww.google.com%0A
当我调试时,停在:

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType 
[[request URL] absoluteString]返回
{ URL: file://http%3A%2F%2Fwww.google.com%0A }

该框架添加了 file://前缀,为什么????我没有要求...:/

最佳答案

假定它是file:// URL,因为在http%3A%2F%2Fwww.google.com%0A中找不到URL scheme

将URL更改为http://www.google.com,就可以了(结尾的%0A也可疑)。

关于ios - iOS-UIWebView-URL的奇怪连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22151687/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com