November 2013
Intermediate to advanced
576 pages
19h 3m
English
A common design pattern when dealing with ALAssetsLibrary is enumeration. Because the user’s permission is required to access asset groups and assets, you typically need to enumerate the groups and assets to put them in a data structure to use in your user interface. The sample app will enumerate the groups on the device first to gather information about them to present in ICFAssetLibraryViewController. To do this, create an instance of ALAssetsLibrary, and then call the method to enumerate groups.
ALAssetsLibrary *al =[[[ALAssetsLibrary alloc] init] autorelease];...[al enumerateGroupsWithTypes:ALAssetsGroupAll usingBlock:enumerateAssetGroupsBlock ...
Read now
Unlock full access