forked from Busivid/cordova-plugin-library-helper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ALAssetsLibrary+CustomPhotoAlbum.h
34 lines (30 loc) · 1.39 KB
/
ALAssetsLibrary+CustomPhotoAlbum.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//
// ALAssetsLibrary category to handle a custom photo album
//
// Created by Marin Todorov on 10/26/11.
// Copyright (c) 2011 Marin Todorov. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AssetsLibrary/AssetsLibrary.h>
@interface ALAssetsLibrary (CustomPhotoAlbum)
// |image|: the target image to be saved
// |albumName|: custom album name
// |completionBlock|: block to be executed when succeed to write the image data
// to the assets library (camera roll)
// |failureBlock|: block to be executed when failed to add the asset to the
// custom photo album
-(void)saveImage:(UIImage *)image
toAlbum:(NSString *)albumName
completionBlock:(ALAssetsLibraryWriteImageCompletionBlock)completionBlock
failureBlock:(ALAssetsLibraryAccessFailureBlock)failureBlock;
// |videoUrl|: the target video to be saved
// |albumName|: custom album name
// |completionBlock|: block to be executed when succeed to write the image data
// to the assets library (camera roll)
// |failureBlock|: block to be executed when failed to add the asset to the
// custom photo album
-(void)saveVideo:(NSURL *)videoUrl
toAlbum:(NSString *)albumName
completionBlock:(ALAssetsLibraryWriteImageCompletionBlock)completionBlock
failureBlock:(ALAssetsLibraryAccessFailureBlock)failureBlock;
@end