Properties of albums in ipad photo library

2020-02-15 02:45发布

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 anyone who have tries this or who have any knowledge in this case ,please help.

Thanks, Christy

1条回答
神经病院院长
2楼-- · 2020-02-15 03:09

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                                              
                                 }];
查看更多
登录 后发表回答