Need help with ALAssetsLibrary-CustomPhotoAlbum?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

Kjuly
411 Stars 101 Forks MIT License 121 Commits 5 Opened issues

Description

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

Services available

!
?

Need anything else?

Contributors list

# 59,152
Objecti...
iOS
C
pod
94 commits
# 125,484
Clojure
Redis
epl
edn
1 commit
# 148,040
Objecti...
Swift
Xcode
swift-s...
1 commit
# 358,755
Ruby
Objecti...
iOS
Shell
1 commit
# 533,527
Objecti...
Ruby
iOS
1 commit
# 259,740
Objecti...
iOS
C
Shell
1 commit

ALAssetsLibrary-CustomPhotoAlbum

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
// |completion|: Block to be executed when succeed to write the image data
//               to the assets library (camera roll)
//    |failure|: Block to be executed when failed to add the asset to the
//               custom photo album
- (void)saveImage:(UIImage *)image
          toAlbum:(NSString *)albumName
       completion:(ALAssetsLibraryWriteImageCompletionBlock)completion
          failure:(ALAssetsLibraryAccessFailureBlock)failure;

And for video:

//   |videoUrl|: The target video to be saved
//  |albumName|: Custom album name
// |completion|: Block to be executed when succeed to write the image data
//               to the assets library (camera roll)
//    |failure|: Block to be executed when failed to add the asset to the
//               custom photo album
- (void)saveVideo:(NSURL *)videoUrl
          toAlbum:(NSString *)albumName
       completion:(ALAssetsLibraryWriteImageCompletionBlock)completion
          failure:(ALAssetsLibraryAccessFailureBlock)failure;

Write the image data with meta data to the assets library (camera roll).

//  |imageData|: The image data to be saved
//  |albumName|: Custom album name
//   |metadata|: Meta data for image
// |completion|: Block to be executed when succeed to write the image data
//    |failure|: block to be executed when failed to add the asset to the custom photo album
- (void)saveImageData:(NSData *)imageData
              toAlbum:(NSString *)albumName
             metadata:(NSDictionary *)metadata
           completion:(ALAssetsLibraryWriteImageCompletionBlock)completion
              failure:(ALAssetsLibraryAccessFailureBlock)failure;

Dependence

  1. AssetsLibrary.framework
  2. MobileCoreServices.framework
  3. Photos.framework (for iOS 8+ projects)

REFERENCE

Contributors

@MarinTodorov
@Kjuly
@coryjthompson
@speedyapocalypse
@blazingpair (@paulz)
@ajcollins
@wka
@NSFish
@michaelcameron

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.