[Objective-C] Objective C从远程url下载图片 →→→→→进入此内容的聊天室

来自 , 2019-05-02, 写在 Objective-C, 查看 163 次.
URL http://www.code666.cn/view/ba51e615
  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. }
  9. //objectc/8943

回复 "Objective C从远程url下载图片"

这儿你可以回复上面这条便签

captcha