ios base64图片转成uiimage

-(UIImage)base64Toimage:(NSString * strImage)

{

NSURL *url = [NSURL URLWithString: strEncodeData];

NSData *data = [NSData dataWithContentsOfURL: url];

UIImage *image = [UIImage imageWithData: data];

return image;

}


UIImageView *imageView = [[UIImageView alloc ] initWithFrame:self.view.frame];

[imageView setImage:[self decodeBase64ToImage:strImage] ];

[self.view addSubview:imageView];

你可能感兴趣的:(ios base64图片转成uiimage)