使用beta4時,func updateUISuccess(jsonResult:NSDictionary!) { if let tempResult = jsonResult["main"]?["temp"]? as? Double { 會報錯:Type 'String' does not conform to protocol 'NSCopying'
2 回答
舉報
0/150
提交
取消
使用beta4時,func updateUISuccess(jsonResult:NSDictionary!) { if let tempResult = jsonResult["main"]?["temp"]? as? Double { 會報錯:Type 'String' does not conform to protocol 'NSCopying'
2014-07-28
舉報
2022-03-27
老師也會直接參與回答的那個知識點不懂,多多練習。
2014-07-31
請看看github上的代碼 https://github.com/JakeLin/SwiftWeather/blob/master/Swift%20Weather/ViewController.swift#L79 ,由于Apple更新了Swift的編譯器,所以,視頻的代碼在Beta1上可以編譯,在新版本就編譯不了,請看github上最新的代碼。