MBProgressHUD with NSURLConnection

后端 未结 3 1821
予麋鹿
予麋鹿 2020-12-15 14:26

I was trying to use MBProgressHUD with NSURLConnection.

The example in Demo project of MBProgressHUD reports:

- (IBAction)showURL:(id)sender {
    NS         


        
3条回答
  •  余生分开走
    2020-12-15 15:16

    In swift i solved this issue by sending empty string in Accept-Encoding header field of the url request. Total bytes expected to write now returns the actual size in bytes of the file being downloaded.

    var request = URLRequest(url: url)
    request.addValue("", forHTTPHeaderField: "Accept-Encoding")
    

提交回复
热议问题