3

この方法を使用する前にAFNetworkingで作業したとき

webviewMain.loadRequest(request, MIMEType: mimeType, textEncodingName: textEncoding, progress: { [weak self] (bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) -> Void in

        let progress = Float(totalBytesWritten) / Float(totalBytesExpectedToWrite)
        self?.progressView.progress = progress

                    }, success: { (responce, data) -> NSData? in
                        return data
                    }) { [weak self] (error) -> Void in

                }

しかし、今ではコンパイルエラーが表示されますCannot convert value of type '(_, _, _) -> Void' to expected argument type 'AutoreleasingUnsafeMutablePointer<NSProgress?>' (aka 'AutoreleasingUnsafeMutablePointer<Optional<NSProgress>>')

私が理解している限り、進捗ブロックを NSPredicate 変数に置き換える必要があります。もしそうなら、進捗状況を追跡する方法がわかりません。

何を変更する必要がありますか?

4

0 に答える 0