ALAsset每个资产都属于一个事件吗?

时间:2012-07-02 03:40:25

标签: alassetslibrary alasset

我正在做一个涉及ALassets的项目。我知道,从iphoto手机中的每张照片都属于一个事件。事件似乎就像文件夹。我不清楚的是,如果您将手机同步到PC而不是Mac,那么每项资产是否仍属于某项活动?

感谢您的建议。

1 个答案:

答案 0 :(得分:0)

AssetLibrary有所谓的组。这些组包含资产。有以下类型的组:

enum {
    ALAssetsGroupLibrary        = (1 << 0),         // The Library group that includes all assets.
    ALAssetsGroupAlbum          = (1 << 1),         // All the albums synced from iTunes or created on the device.
    ALAssetsGroupEvent          = (1 << 2),         // All the events synced from iTunes.
    ALAssetsGroupFaces          = (1 << 3),         // All the faces albums synced from iTunes.
    ALAssetsGroupSavedPhotos    = (1 << 4),         // The Saved Photos album.
    ALAssetsGroupPhotoStream    = (1 << 5),         // The PhotoStream album.
    ALAssetsGroupAll            = 0xFFFFFFFF,       // The same as ORing together all the available group types, 
                                                    // with the exception that ALAssetsGroupLibrary is not included.
};

资产只是事件的一部分,如果它已被iTunes同步或由相机连接套件创建。在设备上拍摄的照片始终是ALAssetsGroupSavedPhotos(相机胶卷)的一部分,还可以分配给用户创建的相册。