objective c - How to stop downloading file in Skydrive API -
after starting downloading file, how stop downloading file? initiate download this:
[docdirskydrive appendstring:[nsstring stringwithformat:@"/%@ ",[[filesfromskydrive objectatindex:indexpath] objectforkey:@"name"]]]; nsmutablestring *downloadpath=[[nsmutablestring alloc]init]; [downloadpath appendformat:@"%@/content",[[filesfromskydrive objectatindex:indexpath] objectforkey:@"id"]]; [self.liveclient downloadfrompath:downloadpath delegate:self userstate:@"download"];
this code snippet downloading files, don't know how stop downloading files 1 time started.
try this
[docdirskydrive appendstring:[nsstring stringwithformat:@"/%@ ",[[filesfromskydrive objectatindex:indexpath] objectforkey:@"name"]]]; nsmutablestring *downloadpath=[[nsmutablestring alloc]init]; [downloadpath appendformat:@"%@/content",[[filesfromskydrive objectatindex:indexpath] objectforkey:@"id"]]; liveoperation *opperation = [self.liveclient downloadfrompath:downloadpath delegate:self userstate:@"download"];
then can cancel opperation using [opperation cancel];
objective-c skydrive
No comments:
Post a Comment