不能援引“responseArray”型
问题描述:
我使用Alamofire,与ObjectMapper的参数列表,事情如此顺利升级到雨燕2.0,现在前,不能援引“responseArray”型
为以下特征:
public func responseArray<T: Mappable>(completionHandler: ([T]?, ErrorType?) -> Void) -> Self
我打电话
Alamofire.request(.GET, URL, parameters: nil)
.responseArray { (response: [MyObject]?, error: NSError?) in
}
,并得到以下错误:
Cannot invoke 'responseArray' with an argument list of type (([MyObject]?, NSError?) ->())
任何帮助将超级赞赏。
答
试试这个。
Alamofire.request(.GET, URL, parameters: nil)
.responseArray { (response: [MyObject]?, error) in
//your process
}