2012-10-21 39 views

回答

6
ALAuthorizationStatus status = [ALAssetsLibrary authorizationStatus]; 

ALAuthorizationStatus该文档显示可能的值。此API仅适用于iOS 6.0或更高版本。

+0

应该是“ALAssetLibrary” –

+0

固定 - 谢谢。 – rmaddy

+0

iOS 6.0下面应该怎么做? – demon

1

我用这敷设渠道:

[assetsLibrary enumerateGroupsWithTypes:ALAssetsGroupAll usingBlock:^(ALAssetsGroup *group, BOOL *stop) { 
     if (*stop) { 
      return ; 
     } 
// TODO : access granted 
    *stop = TRUE; 
    } failureBlock:^(NSError *error) { 
     // TODO: User denied access. Tell them we can't do anything. 
    }];