2012-10-21 38 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. 
    }];