使用
ALAssetsLibrary类的
-(void)enumerateGroupsWithTypes:(ALAssetsGroupType)types usingBlock:(ALAssetsLibraryGroupsEnumerationResultsBlock)enumerationBlock failureBlock:(ALAssetsLibraryAccessFailureBlock)failureBlock方法枚举ALAssetsGroup对象时,types参数为ALAssetsGroupAll,发现并没有获取到相册里的所有图片,半天找不到问题所在,后来发现qq发送图片时,有些图片会先从iCloud同步,然后再发送,于是我猜想那些丢失的图片应该是同步到iCloud,我们本地相册并没有,然后我到手机的照片查看一张模糊的图片,等待图片同步完,再到自己的应用里查看相册,那张同步完的照片就出现了,另外也可以在设置里找到照片把自动同步iCloud关掉,那么本地就全是那些真实存在的图片了,在我们自己的应用里也能看到相册里的所有图片了。