Search code examples
iphoneobjective-cios6photo-galleryalassetslibrary

Saving photos to custom library


My problem is really annoying. I'm creating app which takes photos and need to save them to custom gallery. I've found a couple of tutorials how to do this with AlAssetsLibrary but there is one, big problem... There is no saveImage:toAlbum:withCompletionBlock: method. I've used addAssetsGroupAlbumWithName:resultBlock:failureBlock: to create custom photo album but there is no way I can save images to this gallery! I'm using iOS 6 iPhone 4.

Any ideas!?


Solution

  • The method you mentioned in the question saveImage:toAlbum:withCompletionBlock is not part of ALAssetsLibrary. This method is written in ALAssetLibary's category. You got to import the category in your class to use the method.

    To learn more about objective C category , check out the developer reference.