I want to check whether the library is present or not. How can I check whether a library with the same name already exists?
I wants to check the library created by below code is present or not programmatically, how i can check the library is present or not programmatically?
Thanks
I use the following code for saving a custom library.
//Code for create custom library and save image
-(void)savePhoto
{
self.library = [[ALAssetsLibrary alloc] init];
[self.library addAssetsGroupAlbumWithName:@"My Library" resultBlock:nil failureBlock:nil];
[self savePhotoFinal:[UIImage imageNamed:@"tattoo1.jpg"];
}
-(void)savePhotoFinal:(UIImage *)image
{
[self.library saveImage:image toAlbum:@"My Library" withCompletionBlock:^(NSError *error) {
if (error!=nil) {
NSLog(@"Big error: %@", [error description]);
}
}];
}