Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift 3 UIwebView不加载所有URL_Swift_Uiwebview - Fatal编程技术网

Swift 3 UIwebView不加载所有URL

Swift 3 UIwebView不加载所有URL,swift,uiwebview,Swift,Uiwebview,我在我的swift 3应用程序中有一个UIWebView,它可以很好地与我的私人网站url、google url和其他一些url配合使用 但是,当我尝试输入此url时 http://tzur-yitzhak.co.il/ 我得到的是没有错误的白色空白页。我整晚都在想为什么。 URL在safari和chrome上也可以正常工作 我在Plist中使用并向HTTP发送了permission <key>NSAppTransportSecurity</key> <d

我在我的swift 3应用程序中有一个UIWebView,它可以很好地与我的私人网站url、google url和其他一些url配合使用

但是,当我尝试输入此url时

http://tzur-yitzhak.co.il/
我得到的是没有错误的白色空白页。我整晚都在想为什么。 URL在safari和chrome上也可以正常工作

我在Plist中使用并向HTTP发送了permission

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>
有人能就这个问题提出建议吗?

请使用此代码

let myURL = URL(string: "https://www.apple.com")
let myRequest = URLRequest(url: myURL!)
webview.load(myRequest)
let myURL = URL(string: "https://www.apple.com")
let myRequest = URLRequest(url: myURL!)
webview.load(myRequest)