Note that there are some explanatory texts on larger screens.

plurals
  1. POShowing Accurate Progress In UIProgressView While Downloading Images in iphone
    primarykey
    data
    text
    <p><strong>I have four urls which consists images... I'm downloding those images and placing them into documents folder..</strong></p> <p><strong>here is my code..</strong></p> <pre><code>-(void)viewDidLoad { NSMutableArray *myUrlsArray=[[NSMutableArray alloc]init]; [myUrlsArray addObject:@"http://blogs.sfweekly.com/thesnitch/steve_jobs3.jpg"]; [myUrlsArray addObject:@"http://www.droid-life.com/wp-content/uploads/2012/12/Steve-Jobs-Apple.jpg"]; [myUrlsArray addObject:@"http://2.bp.blogspot.com/-T6nbl0rQoME/To0X5FccuCI/AAAAAAAAEZQ/ipUU7JfEzTs/s1600/steve-jobs-in-time-magazine-front-cover.png"]; [myUrlsArray addObject:@"http://images.businessweek.com/ss/08/09/0929_most_influential/image/steve_jobs.jpg"]; [myUrlsArray addObject:@"http://cdn.ndtv.com/tech/gadget/image/steve-jobs-face.jpg"]; for (int i=0; i&lt;myUrlsArray.count; i++) { [self downloadImageFromURL:[myUrlsArray objectAtIndex:i] withName:[NSString stringWithFormat:@"MyImage%i.jpeg",i]]; } } #pragma mark- downloading File -(void)downloadImageFromURL:(NSString *)myURLString withName:(NSString *)fileName { UIImage *image = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:myURLString]]]; NSLog(@"%f,%f",image.size.width,image.size.height); // Let's save the file into Document folder.** NSString *documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES) objectAtIndex:0]; NSString *jpegPath = [NSString stringWithFormat:@"%@/%@",documentsPath,fileName];// this path if you want save reference path in sqlite NSData *data2 = [NSData dataWithData:UIImageJPEGRepresentation(image, 1.0f)];//1.0f = 100% quality [data2 writeToFile:jpegPath atomically:YES]; } </code></pre> <p><strong>NOW... I need to display a UIProgressView for above downloading progress accurately.</strong></p> <p><strong>how can i achieve this functionality...</strong></p> <p><strong>Can any one provide some guidelines to achieve this..</strong></p> <p><strong>Thanks in advance...</strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload