In my webview I set the download pop actionsheet while it find the anykind of file format.when i click the download button from the actionsheet then it download my file correctly from the url(using NSURLConnection and corresponding methods).Here i need the download progress is visible in another tableviewcontroller with progressbar.
if ([[[currentURL lastPathComponent]pathExtension]isEqualToString:@"mp3"]||
[[[currentURL lastPathComponent]pathExtension]isEqualToString:@"pdf"]||
[[[currentURL lastPathComponent]pathExtension]isEqualToString:@"mp4"]){
NSLog(@"downloadprogress method");
NSLog(@"CURRENT URL:::%@",currentURL);
[passArray addObject:currentURL];
NSLog(@"PassArray::%@",passArray);
[[self.tabBarController.tabBar.items objectAtIndex:2] setBadgeValue:[NSString stringWithFormat:@"%d",passArray.count]];
}
here i add url when i click download button to passArray and pass it to my tableviewcontroller.But that is not working.
Detail Explaination:
- I have tabbar with webviewcontroller and tableviewcontroller
- in my webview i enter some pdf file url then it pop download
- When i click my download button then the url of that pdf will downloding in tableviewcontroller even am in webviewcontroller
- if i switch to tableviewcontroller then it display the proggressbar with download progress and corresponding percentage.
Here i done the first 2 steps.How can i do the 3 and 4? Please help me......