ios - ASIHttpRequest request:didReceiveBytes: not working as expected -
i'm sure there's easy explanation this, i'm tearing hair out on matter.
-(void)addrequestwithurl:(nsurl *)url savepath:(nsstring *)path { asihttprequest *request = [asihttprequest requestwithurl:url]; request.userinfo = [[nsmutabledictionary alloc] initwithobjectsandkeys:path, @"savepath", nil]; networkqueue.showaccurateprogress = yes; [self.networkqueue addoperation:request]; [self.networkqueue setdownloadprogressdelegate:self]; } -(void)request:(asihttprequest *)request didreceivebytes:(long long)bytes { dlog(@"bytes: %llu", bytes); }
didreceivebytes not ever called. if set download progress delegate each request instead of queue didreceivebytes method called, after each request finished, , value of 1.
any suggestions what's wrong here? (working on ios btw)
yeah took me while figure 1 out, got same result until started asihttprequest code. have add:
request.showaccurateprogress = yes;
before networkqueue.showaccurateprogress = yes; because otherwise not read individual head info of each file , add bytes.
Comments
Post a Comment