0
现在我知道还有其他问题已经回答有关初始值设定项的条件绑定必须有可选类型错误,但我已经尝试过这些解决方案,似乎没有任何工作或是关于NSURL。我的专门谈论它不能是NSURL。我不知道如何解决它。Swift:If Let Conundrum
let attemptedUrl = NSURL(string: "http://www.weather-forecast.com/locations/" +
textField.text!.stringByReplacingOccurrencesOfString(" ", withString: "-") +
"/forecasts/latest")!
if let url = attemptedUrl {
的是具有错误代码的具体行是 如果让URL = {attemptedUrl
该死!这就是这个简单的哈哈谢谢你 – Fumbles