如何使用照片框架将照片保存为突发模式IOS 8?

时间:2016-02-24 13:01:02

标签: ios phasset photosframework

我使用以下代码备份了一组连拍模式照片

    PHFetchOptions *fetchOptions = [PHFetchOptions new];
        fetchOptions.includeAllBurstAssets = YES;
        fetchOptions.predicate = [NSPredicate predicateWithFormat:@"mediaType == %d", PHAssetMediaTypeImage];
        PHFetchResult *allPhotosResult = [PHAsset fetchAssetsWithOptions:fetchOptions];
        NSLog(@"photos count: %lu",(unsigned long)[allPhotosResult count]);

        [allPhotosResult enumerateObjectsUsingBlock:^(PHAsset *asset, NSUInteger idx, BOOL *stop) {

            // burst mode photos
            if (asset.representsBurst) {
                NSLog(@"Count:%d",++i);

                PHFetchOptions *fetchOptions = [PHFetchOptions new];
                fetchOptions.includeAllBurstAssets = YES;
                PHFetchResult *burstSequence = [PHAsset fetchAssetsWithBurstIdentifier:asset.burstIdentifier options:fetchOptions];

            }
        }]; 

现在如何恢复即将保存模式照片保存回照片库,看起来createRequestForAssetFromImage仅限于UIImage参数,还有其他替代品吗?

0 个答案:

没有答案