A nice ALAssetsLibrary category for saving images into custom photo album by @MarinTodorov.
// |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;
And for video:
// |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;
- AssetsLibrary.framework
- MobileCoreServices.framework