0

I am getting asset URL from NSURL* localUrl = (NSURL *)[info valueForKey:UIImagePickerControllerReferenceURL]; and I saved it in a local database. And at the time of retrieving I have got an string and I have convert it into NSURL through NSURL *url1 = [NSURL URLWithString:image_path]; but when I get NSData from this URL through NSData *myData = [NSData dataWithContentsOfURL:url1]; it return NULL. Can anyone help me to get NSData and convert it into image.

4

1 回答 1

1

你不能直接转换它。您将不得不使用ALAsset Block. 这是同一事物的完整描述。

从 iPhone 中的 ALAsset 检索的 URL 显示图像

于 2012-09-19T06:51:46.580 回答