jjzjj

handleDownload

全部标签

swift - 无法将 Swift 2.2 currying 转换为 future 的 Swift 格式

我有以下curried函数,我收到Xcode警告,Curried函数语法将在Swift的future版本中被删除;使用单个参数列表,但建议的修复不起作用(它只是将参数组合到一个函数调用中)。我正在尝试转换为新格式,但我不明白它是如何工作的。下面的beginFetchWithCompletionHandler函数期望handleDownload具有(data:NSData?,error:NSError?)的参数签名。fetcher.beginFetchWithCompletionHandler(handleDownload)我还想传入一个整数,如下:fetcher.beginFetchW