Platforms to show: All Mac Windows Linux Cross-Platform
PHAssetCollectionChangeRequestMBS class
Super class: PHChangeRequestMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
You use the PHAssetCollectionChangeRequestMBS class to request changes for PHAssetCollectionMBS objects. To make changes to asset collections (such as user-created albums) in the Photos library, create a change request using the appropriate class method for the change you want to perform.
- Call the creationRequestForAssetCollectionWithTitle: method to create a new asset collection.
- Call the deleteAssetCollections: method to delete existing asset collections.
- Call the changeRequestForAssetCollection: or changeRequestForAssetCollection:assets: method to modify a collection’s metadata or list of member assets.
Before creating a change request, use the canPerformEditOperation: method to verify that the collection allows the edit operation you’re requesting. If you attempt to perform an unsupported edit operation, Photos throws an exception.
A change request for creating or modifying an asset collection works like a mutable version of the asset collection object. Use the change request’s properties and instance methods to request changes to the asset collection itself.
After Photos runs the change block and calls your completion handler, the asset collection’s state reflects the changes you requested in the block.
If you create or use a change request object outside a photo library change block, Photos raises an Objective-C exception. For details on change blocks, see PHPhotoLibraryMBS.
Subclass of the PHChangeRequestMBS class.
- 2 properties
- property placeholderForCreatedAssetCollection as PHObjectPlaceholderMBS
- property title as String
- 13 methods
- method addAsset(asset as PHAssetMBS)
- method addAssets(assets() as PHAssetMBS)
- method Constructor
- method insertAsset(asset as PHAssetMBS, index as Integer)
- method insertAssets(assets() as PHAssetMBS, indexes as NSIndexSetMBS)
- method moveAsset(fromIndex as Integer, toIndex as Integer)
- method moveAssets(fromIndexes as NSIndexSetMBS, toIndex as Integer)
- method removeAsset(asset as PHAssetMBS)
- method removeAsset(AtIndex as Integer)
- method removeAssets(assets() as PHAssetMBS)
- method removeAssets(AtIndexes as NSIndexSetMBS)
- method replaceAsset(AtIndex as Integer, asset as PHAssetMBS)
- method replaceAssets(AtIndexes as NSIndexSetMBS, assets() as PHAssetMBS)
- 5 shared methods
- shared method available as boolean
- shared method changeRequestForAssetCollection(assetCollection as PHAssetCollectionMBS) as PHAssetCollectionChangeRequestMBS
- shared method changeRequestForAssetCollection(assetCollection as PHAssetCollectionMBS, assets as PHFetchResultMBS) as PHAssetCollectionChangeRequestMBS
- shared method creationRequestForAssetCollectionWithTitle(title as string) as PHAssetCollectionChangeRequestMBS
- shared method deleteAssetCollections(Collections() as PHCollectionListMBS)
Super class PHChangeRequestMBS
- property Handle as Integer
- method Constructor Private
- shared method available as boolean
This class has no sub classes.
The items on this page are in the following plugins: MBS Mac64bit Plugin.
PHAssetChangeRequestMBS - PHAssetCollectionMBS