- - (UIImage *) getImageFromURL: (NSString *)theURL {
- UIImage *theImage = NULL;
- NSString *imageFileName = [BT_strings getFileNameFromURL:theURL];
- NSData *imageData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:theURL]];
- theImage = [[UIImage alloc] initWithData:imageData];
- [BT_fileManager saveImageToFile:theImage fileName:imageFileName];
- return theImage;
- }
来源: http://www.phpxs.com/code/1005492/