FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

OneTouchMedia/ALAssetsLibrary-CustomPhotoAlbum: A nice ALAssetsLibrary category for saving images & videos into custom photo album. by @MarinTodorov. · GitHub

 
 

Repository files navigation

ALAssetsLibrary-CustomPhotoAlbum

Description

A nice ALAssetsLibrary category for saving images into custom photo album by @MarinTodorov.

Usage

//           |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;

Dependence

  1. AssetsLibrary.framework
  2. MobileCoreServices.framework

REFERENCE:

About

A nice ALAssetsLibrary category for saving images & videos into custom photo album. by @marintodorov.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors


Back | FazBrowse Home | New Git URL