Online Documentation - Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchy
New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1
The list of the topics, classes, interfaces, controls, modules, global methods by category, global methods by name, screenshots, licenses and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
Super class: PHCollectionMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
In the Photos framework, collection objects (including asset collections) do not directly reference their member objects, and there are no other objects that directly reference collection objects. To retrieve the members of a collection list, fetch them with a PHCollectionMBS class method such as fetchCollectionsInCollectionList. To find objects at the root of the collection list hierarchy (such as album folders with no parent folders), use the fetchTopLevelUserCollectionsWithOptions method.
Accessing or modifying the Photos library requires explicit authorization from the user. The first time you call one of the methods listed in Fetching Collection Lists, Photos automatically prompts the user for authorization. (Alternatively, you can use the PHPhotoLibraryMBS requestAuthorization: method to prompt the user at a time of your choosing.)
Your app’s Info.plist file must provide a value for the NSPhotoLibraryUsageDescription key that explains to the user why your app is requesting Photos access. Apps linked on or after iOS 10.0 will crash if this key is not present.
Like assets and asset collections, collection lists are immutable. To create, rename, or delete collection lists, or to add, remove, or rearrange members in a collection list, create a PHCollectionListChangeRequestMBS object within a photo library change block. For details on using change requests and change blocks to update the photo library, see PHPhotoLibraryMBS.
Subclass of the PHCollectionMBS class.
Constant | Value | Description |
---|---|---|
SubtypeAny | -1 |
Use this value to fetch collection lists of all possible subtypes. |
SubtypeMomentListCluster | 1 |
The collection list is a moment cluster, grouping several related moments. |
SubtypeMomentListYear | 2 |
The collection list is a moment year, grouping all moments from one or more calendar years. |
SubtypeRegularFolder | 100 |
The collection list is a folder containing albums or other folders. |
SubtypeSmartFolderEvents | 200 |
The collection list is a smart folder containing one or more Events synced from iPhoto. |
SubtypeSmartFolderFaces | 201 |
The collection list is a smart folder containing one or more Faces synced from iPhoto. |
Constant | Value | Description |
---|---|---|
TypeFolder | 2 |
A folder containing asset collections of type PHAssetCollectionTypeAlbum or PHAssetCollectionTypeSmartAlbum. |
TypeMomentList | 1 | A group of asset collections of type PHAssetCollectionTypeMoment. more |
TypeSmartFolder | 3 |
A smart folder synced to the device. |
Constant | Value | Description |
---|---|---|
EditOperationAddContent | 3 |
The collection supports adding items that already exist elsewhere in the photo library. |
EditOperationCreateContent | 4 |
The collection supports creating new items. |
EditOperationDelete | 6 |
The collection itself can be deleted. |
EditOperationDeleteContent | 1 |
The collection supports deleting the items it contains. |
EditOperationRearrangeContent | 5 |
The collection supports reordering the arrangement of items it contains. |
EditOperationRemoveContent | 2 |
The collection supports removing the items it contains. |
EditOperationRename | 7 |
The collection itself can be renamed. |
This class has no sub classes.
The items on this page are in the following plugins: MBS Mac64bit Plugin.
PHCollectionListChangeRequestMBS - PHCollectionMBS