Ios uiwebview不适用于Swift 2.0

Ios uiwebview不适用于Swift 2.0,ios,xcode,uiwebview,swift2,xcode7,Ios,Xcode,Uiwebview,Swift2,Xcode7,启动模拟器时,我用于Xcode 6.4打开uiwebview的代码没有用于Xcode 7 class ViewController: UIViewController { @IBOutlet var webLaundry: UIWebView! func loadWebPage(){ let theURL = "http://www.google.com" let theRequestURL = NSURL (string: theURL) let theReque

启动模拟器时,我用于Xcode 6.4打开uiwebview的代码没有用于Xcode 7

class ViewController: UIViewController {

@IBOutlet var webLaundry: UIWebView!


func loadWebPage(){
    let theURL = "http://www.google.com"
    let theRequestURL = NSURL (string: theURL)
    let theRequest = NSURLRequest (URL: theRequestURL!)
    webLaundry.loadRequest(theRequest)
}

override func viewDidLoad() {
    super.viewDidLoad()
    loadWebPage()
    // Do any additional setup after loading the view, typically from a nib.
}

我应该改变什么来解决这个问题?

这是苹果新的安全要求。iOS 9中的应用程序传输安全

您需要做的是:

在xcode 7中,在您的项目中,找到Info.plist,右键单击,作为源代码打开

把下面的单词放在最后和后面之间

NSAppTransportSecurity NSAllowsArbitraryLoads

运行您的项目
你能解释一下在这种情况下不工作意味着什么吗?模拟器只是显示一个白色屏幕,调试器中没有网络连接。