iOS 获取相册中图片的url

 __block NSString *imageFileName;
 NSURL *imageURL = [info valueForKey:UIImagePickerControllerReferenceURL];
 ALAssetsLibraryAssetForURLResultBlock resultblock = ^(ALAsset *myasset) {
   ALAssetRepresentation *representation = [myasset defaultRepresentation];
   imageFileName = [representation filename];
 };
 ALAssetsLibrary* assetslibrary = [[ALAssetsLibrary alloc] init];
 [assetslibrary assetForURL:imageURL resultBlock:resultblock failureBlock:nil];

你可能感兴趣的:(iOS 获取相册中图片的url)