使用Photo框架照片框架ios 8获取图像路径

时间:2015-12-01 18:33:47

标签: ios objective-c image path

您好我使用照片框架将图像保存在特定相册中,这是我的代码:

[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
        PHAssetChangeRequest *assetChangeRequest = [PHAssetChangeRequest creationRequestForAssetFromImage:self.imagenSelecionada.image];

        if (self.assetCollection) {
            PHAssetCollectionChangeRequest *assetCollectionChangeRequest =   [PHAssetCollectionChangeRequest changeRequestForAssetCollection:self.assetCollection];
            [assetCollectionChangeRequest addAssets:@[[assetChangeRequest placeholderForCreatedAsset]]];
        }
    } completionHandler:^(BOOL success, NSError *error) {
        if (!success) {
            NSLog(@"Error creating asset: %@", error);
        }
    }];

我需要获取保存图像的图像路径,以便在SQLite数据库中保存。

0 个答案:

没有答案