ipad照片库中相册的属性

时间:2011-05-02 07:17:02

标签: iphone cocoa-touch ipad

有没有办法让ipad照片库中同步的相册属性。我想获取照片库中保存相册的名称。请尝试过这个或者有任何知识的人请帮忙。

谢谢, 克里斯蒂

1 个答案:

答案 0 :(得分:1)

您想要使用ALAssetsLibrary。这应该让你朝着正确的方向前进:

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                                              
                                 }];
相关问题