Platforms to show: All Mac Windows Linux Cross-Platform
PHCollectionMBS class
Super class: PHObjectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
You do not create or work with instances of this class directly. Instead, use one of its two concrete subclasses, PHAssetCollectionMBS or PHCollectionListMBS.
- A PHAssetCollectionMBS object represents a collection of photo or video assets, such as an album, moment, or Shared Photo Stream.
- A PHCollectionListMBS object represents a collection that contains other collections, such as a a folder containing albums or the set of all moments in a calendar year.
Accessing or modifying the Photos library requires explicit authorization from the user. The first time you call one of the methods listed in Fetching Collections, 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.
Subclass of the PHObjectMBS class.
- 3 properties
- property canContainAssets as Boolean
- property canContainCollections as Boolean
- property localizedTitle as String
- 2 methods
- method canPerformEditOperation(anOperation as Integer) as Boolean
- method Constructor
- 3 shared methods
- shared method available as boolean
- shared method fetchCollectionsInCollectionList(collectionList as PHCollectionListMBS, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- shared method fetchTopLevelUserCollections(options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- 7 constants
Edit Operations
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. |
Super class PHObjectMBS
- 2 properties
- property Handle as Integer
- property localIdentifier as String
- 2 methods
- method Constructor Private
- method copy as PHObjectMBS
- shared method available as boolean
Sub classes:
Some methods using this class:
- PHCollectionListChangeRequestMBS.addChildCollections(collections() as PHCollectionMBS)
- PHCollectionListChangeRequestMBS.insertChildCollections(collections() as PHCollectionMBS, indexes as NSIndexSetMBS)
- PHCollectionListChangeRequestMBS.removeChildCollections(collections() as PHCollectionMBS)
- PHCollectionListChangeRequestMBS.replaceChildCollections(AtIndexes as NSIndexSetMBS, ChildCollections() as PHCollectionMBS)
- PHCollectionListMBS.fetchCollectionListsContainingCollection(collection as PHCollectionMBS, options as PHFetchOptionsMBS = nil) as PHFetchResultMBS
- PHCollectionListMBS.transientCollectionListWithCollections(collections() as PHCollectionMBS, title as String) as PHCollectionListMBS
Some examples using this class:
The items on this page are in the following plugins: MBS Mac64bit Plugin.
PHCollectionListMBS - PHContentEditingInputMBS