【发布时间】:2015-10-09 14:47:31
【问题描述】:
我不断收到此错误:
'(_, _, _, _) -> Void' is not convertible to 'Response<AnyObject, NSError> -> Void'
我查看了很多地方,并尝试了更改,但它在其他地方给了我错误。
Alamofire.request(.GET, "http://example.com/test.php", parameters: ["username": usernamep]).responseJSON { (request, response, json, error) in
if (json != nil) {
var jsonObj = JSON(json!)
if let data = jsonObj["flist"].arrayValue as [JSON]?{
datasMentions = data
....
}
}
【问题讨论】:
-
嗯,你不应该有
(_, _, _, _ ),他们应该是(respond, json, error, _)这些是回复。