我正在嘗試使用PHFetchOptions的includeAllBurstAssets。 在我的相機膠捲中,有大約5張連拍資產(每張大約有10張照片)。PhotoKit:includeAllBurstAssets in PHFetchOptions not working
枚舉資產的相機膠捲我做了以下內容:
PHFetchOptions *fetchOptions = [PHFetchOptions new];
fetchOptions.includeAllBurstAssets = YES;
PHFetchResult *fetchResult = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeSmartAlbumUserLibrary options:fetchOptions];
PHFetchResult *assetFetch = [PHAsset fetchAssetsInAssetCollection:fetchResult[0] options:fetchOptions];
NSLog(@"Found assets %lu",(unsigned long)assetFetch.count);
沒有問題,如果我的includeAllBurstAssets屬性設置爲NO或YES,我得到資產完全相同的計數。 如果includeAllBurstAssets設置爲YES,我預計數字會更高。 這是一個錯誤,或者我錯誤地解釋了includeAllBurstAssets。
謝謝。我認爲includeAllBurstAssets適用於PHAsset的所有獲取方法。它只適用於fetchAssetsWithBurstIdentifier:asset.burstIdentifier從文檔中不完全清楚, – holtmann 2015-02-13 12:26:04