[英]How to delete photo from the Photo's Library of device through the application?
I am getting the images from the photos library through ALAssetsLibrary
. 我正在通过
ALAssetsLibrary
从照片库获取图像。
I want to delete particular image from the photos library by performing select and delete operation from my application it self. 我想通过自己的应用程序执行选择和删除操作来从照片库中删除特定图像。 (Not from photos library)
(不是来自照片库)
Using following code I am getting the images from the photos library : 使用以下代码,我从照片库获取图像:
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
void (^assetEnumerator)( ALAsset *, NSUInteger, BOOL *) = ^(ALAsset *result, NSUInteger index, BOOL *stop)
{
if(result != nil)
{
if([[result valueForProperty:ALAssetPropertyType] isEqualToString:ALAssetTypePhoto])
{
...
}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.