Is there better way to enumerate all photos on the device than this one?
是否有更好的方法来枚举设备上的所有照片而不是这个?
for each asset group do this ...
为每个资产组做这个......
[currentGroup enumerateAssetsUsingBlock:^(ALAsset *result, NSUInteger index, BOOL *stop)
{
if(result == nil)
{
return;
}
// add the asset
}];
2 个解决方案
#1
1
The constant ALAssetsGroupAll is used for enumerating groups of certain or all types. It's used when enumerating the library fishing for groups. But the only way to get all photos, or any type of asset for that matter is to enumerate as you've already coded.
常量ALAssetsGroupAll用于枚举某些或所有类型的组。它在枚举图书馆捕鱼时使用。但获取所有照片或任何类型资产的唯一方法是枚举,因为您已编码。
#2
0
You can just do this once by enumerating the group ALAssetsGroupLibrary
, which contains all the images in the other groups.
您可以通过枚举组ALAssetsGroupLibrary来执行此操作,该组包含其他组中的所有图像。
#1
1
The constant ALAssetsGroupAll is used for enumerating groups of certain or all types. It's used when enumerating the library fishing for groups. But the only way to get all photos, or any type of asset for that matter is to enumerate as you've already coded.
常量ALAssetsGroupAll用于枚举某些或所有类型的组。它在枚举图书馆捕鱼时使用。但获取所有照片或任何类型资产的唯一方法是枚举,因为您已编码。
#2
0
You can just do this once by enumerating the group ALAssetsGroupLibrary
, which contains all the images in the other groups.
您可以通过枚举组ALAssetsGroupLibrary来执行此操作,该组包含其他组中的所有图像。