1 //转换成NSData来保存图片
2 0NSString *path=[NSString stringWithFormat:@"%@/Documents/%@.jpg",NSHomeDirectory(),@"image"];
3 NSData *image = UIImageJPEGRepresentation(imageUrl,0);
4 [image writeToFile:pathatomically:YES];
5
6 NSString *path=[NSString stringWithFormat:@"%@/Documents/%@.jpg",NSHomeDirectory(),@"image"];
7 UIImage *image =[[UIImage alloc]initWithContentsOfFile:path];
8 UIImageView* imageView=[[UIImageView alloc]initWithImage:imageUrl];