dict是字典
let name = dict["name"] as! String Cannot subscript a value of type 'NSDictionary?' with an index of type 'String'错误
使用valueForKey(key)
或 objectForKey(key)方法
let name = (dict?.valueForKey("name"))!
dict是字典
let name = dict["name"] as! String Cannot subscript a value of type 'NSDictionary?' with an index of type 'String'错误
使用valueForKey(key)
或 objectForKey(key)方法
let name = (dict?.valueForKey("name"))!