var dict = [String: AnyObject]()
if let code = dict["code"] as? Int {
let result = String(code)
// do something
}
作者:不二乎 链接:http://www.zhihu.com/question/26766507/answer/35519871 来源:知乎 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。var dict = [String: AnyObject]()
if let code = dict["code"] as? Int {
let result = String(code)
// do something
}
作者:不二乎 链接:http://www.zhihu.com/question/26766507/answer/35519871 来源:知乎 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。