美文网首页
ios base64图片转成uiimage

ios base64图片转成uiimage

作者: jfzhang | 来源:发表于2017-09-22 18:20 被阅读0次

    -(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

          本文链接:https://www.haomeiwen.com/subject/gogfextx.html