简体   繁体   English

ipad相册属性

[英]Properties of albums in ipad photo library

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.有什么方法可以访问在 ipad 照片库中同步的相册的属性。我想获取相册保存在照片库中的名称。请任何尝试过这个或有任何知识的人在这种情况下,请帮助。

Thanks, Christy谢谢,克里斯蒂

You'd want to use the ALAssetsLibrary.您想使用 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                                              
                                 }];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM