AFNetworking与UIWebView问题

时间:2016-01-22 05:41:36

标签: ios uiwebview afnetworking uiwebviewdelegate nsprogress

在使用此方法之前,当我使用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变量替换进度块。如果是这样,我不明白如何跟踪进度。

我需要改变什么?

0 个答案:

没有答案