【发布时间】:2014-08-02 07:19:21
【问题描述】:
var data: NSDictionary =
NSJSONSerialization.JSONObjectWithData(responseData, options:NSJSONReadingOptions.AllowFragments, error: error) as NSDictionary;
这行代码给了我错误
NSError is not convertable to NSErrorPointer.
于是我想把代码改成:
var data: NSDictionary =
NSJSONSerialization.JSONObjectWithData(responseData, options:NSJSONReadingOptions.AllowFragments, error: &error) as NSDictionary;
这会将 NSError 错误转换为 NSErrorPointer。但后来我得到一个新错误,无法理解它:
NSError! is not a subtype of '@|value ST4'
【问题讨论】: