When I worked with AFNetworking before I used this method
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
}
But now I see compilation error Cannot convert value of type '(_, _, _) -> Void' to expected argument type 'AutoreleasingUnsafeMutablePointer<NSProgress?>' (aka 'AutoreleasingUnsafeMutablePointer<Optional<NSProgress>>')
So as far as I understand I need to replace progress block with NSPredicate variable. If so I don't understand how I can track the progress.
What do I need to change?