我有圖像base64字符串,所以請告訴我如何將base64string轉換爲 UIImage。我正在使用下面的代碼,但它不工作。將base64string轉換爲UIImage
NSString *base64String=[NSString stringWithFormat:@"%@",[objDIC objectForKey:@"signDriver"]];
NSURL *url = [NSURL URLWithString:base64String];
NSData *imageData = [NSData dataWithContentsOfURL:url];
UIImage *ret = [UIImage imageWithData:imageData];
在此先感謝
[如何在iPhone上從'Base64String'格式原始圖像數據獲取UIImage?](http://stackoverflow.com/questions/847875/how-to-get-uiimage-from-a- base64string-format-raw-image-data-on-iphone) – 2012-04-06 13:39:46
[看這個答案](http://stackoverflow.com/questions/392464/any-base64-library-on-iphone-sdk),我想是完全正確的你需要什麼 – Alladinian 2012-04-06 13:41:15