Saving image only created album

Discussion in 'iOS Programming' started by erdinc27, Feb 13, 2016.

  1. erdinc27 macrumors regular

    Joined:
    Jul 20, 2011
    #1
    I want to save a photo taken by using my application. Actually i can save it in album created programmatically but it saves the same photo in camera roll also. Is it default or should i make change in my code ? Here how my code looks like
    Code:
    [self.lib enumerateGroupsWithTypes:ALAssetsGroupAlbum usingBlock:^(ALAssetsGroup *group, BOOL *stop) {
           
            if ([[group valueForProperty:ALAssetsGroupPropertyName] isEqualToString:@"Album_Name"]) {
               
                NSLog(@"ALBUM NAME %@", [group valueForProperty:ALAssetsGroupPropertyName]);
               
                [self.lib saveImage:takenImage toAlbum:@"Album_Name" completion:^(NSURL *assetURL, NSError *error) {
                   
                    if (assetURL) {
                       
                       // DO SOMETHING WITH PHOTO
                    }
                   
                } failure:nil];
    
            }
           
        } failureBlock:nil];
     
  2. xStep macrumors 68000

    Joined:
    Jan 28, 2003
    Location:
    Less lost in L.A.
    #2
    As I understand it, albums are really just filters for the camera roll. I noticed that when using some Sony software. Deleting images from an album also does not delete from the roll. So it does not look like you have any control over that. I'd like to be wrong on this.
     
  3. erdinc27 thread starter macrumors regular

    Joined:
    Jul 20, 2011
    #3
    After making research it seem it is exactly how you said.
     
  4. AxoNeuron macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #4
    That's exactly right. The camera roll (now called All Photos) contains everything from all albums.
     

Share This Page