【问题标题】:Argument Labels (_:, destination) do not match available overloads参数标签 (_:, destination) 与可用的重载不匹配
【发布时间】:2018-10-14 02:58:31
【问题描述】:

我正在尝试将我的代码从 Swift 2 迁移到 Swift 3。 这是我使用 Alamofire 恢复数据的代码:

public func download(resumeData: NSData, destination: Request.DownloadFileDestination) -> Request {
    return download(.ResumeData(resumeData), destination: destination)
}

在构建时它显示错误为:

参数标签(_:,destination)与可用的重载不匹配

【问题讨论】:

    标签: swift swift3 alamofire


    【解决方案1】:

    swift 3.0 的正确迁移

            let destination = DownloadRequest.suggestedDownloadDestination(for: .documentDirectory)
    
            Alamofire.download(resumingWith: Data, to: destination)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-08-12
      • 2016-12-16
      • 2018-04-02
      • 2017-05-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多