說我有斯威夫特字典混亂
var dict = parseJSON(getJSON(url)) // This results in an NSDictionary
爲什麼
let a = dict["list"]![1]! as NSDictionary
let b = a["temp"]!["min"]! as Float
允許的,而這個:
let b = dict["list"]![1]!["temp"]!["min"]! as Float
導致錯誤:
Type 'String' does not conform to protocol 'NSCopying'
請解釋爲什麼會發生這種情況,請注意我是Swift新手,沒有任何經驗。