开发者

how to get the image from xml file?

I have xml file in that i have

<Image>/9j/4AAQSkZJRgABAgEAYABgAAD/7Rgu开发者_如何学JAVAUGhvdG9zaG9wIDMuMAA4QklNA+0KUmVzb2x1dGlvbgAA</Image>

I want image on my simulator.. Is there any way to get it? it is in byte code but i want byte code into image. Please give me reply with solution.


You need to convert that nsstring into base 64 encoding string and then

UIImage *image = [UIImage imageWithData:[NSData dataWithBase64EncodedString:64encodedstr]];


You can use

UIImage *img = [[UIImage alloc] initWithData:data];

or

UIImage *img = [UIImage imageWithData:data];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜