Posted By

cruddell001 on 12/09/13


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

iamd3n


Download Image from URL


 / Published in: Objective C
 

  1. - (UIImage *) getImageFromURL: (NSString *)theURL {
  2. UIImage *theImage = NULL;
  3. NSString *imageFileName = [BT_strings getFileNameFromURL:theURL];
  4. NSData *imageData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:theURL]];
  5. theImage = [[UIImage alloc] initWithData:imageData];
  6. [BT_fileManager saveImageToFile:theImage fileName:imageFileName];
  7. return theImage;
  8. }

Report this snippet  

You need to login to post a comment.