Properties of albums in ipad photo library

后端 未结 1 1307
予麋鹿
予麋鹿 2020-12-21 12:10

Is there any way to acccess the properties of the Albums synced in ipad photo library.I want to get the names with which the Album is saved in the photo library.Please anyon

相关标签:
1条回答
  • 2020-12-21 13:02

    You'd want to use the ALAssetsLibrary. This ought to get you moving in the right direction:

    ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];        
    [library enumerateGroupsWithTypes:ALAssetsGroupAll
                           usingBlock:^(ALAssetsGroup *group, BOOL *stop) 
                                     {
                                              if (group == nil) 
                                                  return;
                                              //this is the album name
                                              NSLog(@"%@",[group valueForProperty:ALAssetsGroupPropertyName]); 
                                     } 
                         failureBlock:^(NSError *error) 
                                     {   
                                                //failure code here                                              
                                     }];
    
    0 讨论(0)
提交回复
热议问题