Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Alamofire无法调用非函数类型的值_Ios_Swift_Alamofire - Fatal编程技术网

Ios Alamofire无法调用非函数类型的值

Ios Alamofire无法调用非函数类型的值,ios,swift,alamofire,Ios,Swift,Alamofire,我收到一个错误,提示“无法调用非函数类型'Response'的值”。这有什么问题?response是闭包中返回的参数。它不是可以调用的(完成)函数。response是闭包中返回的参数。它不是一个可以调用的(完成)函数。 Alamofire.request(.GET, "afternoon-plains-5526.herokuapp.com", parameters: nil).responseJSON { response in let json = JSON(respo

我收到一个错误,提示“无法调用非函数类型'Response'的值”。这有什么问题?

response
是闭包中返回的参数。它不是可以调用的(完成)函数。
response
是闭包中返回的参数。它不是一个可以调用的(完成)函数。
    Alamofire.request(.GET, "afternoon-plains-5526.herokuapp.com", parameters: nil).responseJSON { response in
        let json = JSON(response.data!)
        let token = json["token"].string
        response(token: token) //Error!
    }