【发布时间】:2015-03-20 04:53:16
【问题描述】:
请在这里帮助新手。我敢肯定这很简单。
我正在跟随并很好地学习 Xode,但我对与 URL 的基本连接感到困惑:
var text = textField.text
var url = NSURL.URLWithString(text)
var request = NSURLRequest(URL: url)
webView.loadRequest(request)
上面第二行出现以下错误:
'URLWithString' 不可用:使用对象构造'NSURL(string:)'
(代码是简短教程的一部分:http://www.lynda.com/articles/build-first-ios-app-swift)
【问题讨论】: