Platforms to show: All Mac Windows Linux Cross-Platform

Back to PHCollectionListChangeRequestMBS class.

PHCollectionListChangeRequestMBS.addChildCollections(collections() as PHCollectionMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Add the specified collections as children of the collection list.

collections: An array of PHCollectionMBS objects (asset collections or other collection lists) to be added to the collection list.

If you created the change request with a snapshot of the collection list’s contents using the changeRequestForCollectionList method, Photos inserts the new children after the existing child collections in the collection list. Otherwise, the arrangement of the new children relative to others in the collection is undefined.

PHCollectionListChangeRequestMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The constructor.

PHCollectionListChangeRequestMBS.insertChildCollections(collections() as PHCollectionMBS, indexes as NSIndexSetMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Inserts the specified collections into the collection list at the specified indexes.

collections: An array of PHCollectionMBS objects (asset collections or other collection lists) to be inserted into the collection list.
indexes: The indexes at which the collections should be inserted. The count of locations in this index set must equal the count of collections.

To ensure that the index set you specify is valid even if the collection list has changed since you fetched it, create a change request with a snapshot of the collection list’s contents using the changeRequestForCollectionList method before inserting child collections.
For a detailed discussion of how the index set you specify maps to insertions in the collection list, see the similar NSMutableArray method insertObjects.

PHCollectionListChangeRequestMBS.moveChildCollections(AtIndexes as NSIndexSetMBS, toIndex as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Moves the child collections at the specified indexes in the collection list to a new index.

indexes: The indexes of the child collections to be moved in the collection list.
toIndex: The index at which to place the moved child collections, relative to the collection list’s ordering after removing the items at indexes.

When you call this method, Photos first removes the items in the indexes parameter from the collection, and then inserts them at the location specified by the toIndex parameter.
To ensure that the index set you specify is valid even if the collection list has changed since you fetched it, create a change request with a snapshot of the collection list’s contents using the changeRequestForCollectionList method before rearranging child collections.

PHCollectionListChangeRequestMBS.removeChildCollections(AtIndexes as NSIndexSetMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Removes the child collections at the specified indexes from the collection list.

indexes: The indexes of the child collections to be removed from the collection list.

To ensure that the index set you specify is valid even if the collection list has changed since you fetched it, create a change request with a snapshot of the collection list’s contents using the changeRequestForCollectionList method before removing child collections. To remove objects based on their identities (without regard to their indexes in the collection), use the removeChildCollections method.

See also:

PHCollectionListChangeRequestMBS.removeChildCollections(collections() as PHCollectionMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Removes the specified child collections from the collection list.

collections: An array of PHCollectionMBS objects (asset collections or other collection lists) to be removed from the collection list.

This method removes child collections from the collection list based on their identity (determined by the localIdentifier property of each collection). To remove objects at specified indexes, use the removeChildCollections method.

See also:

PHCollectionListChangeRequestMBS.replaceChildCollections(AtIndexes as NSIndexSetMBS, ChildCollections() as PHCollectionMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Replaces the child collections at the specified indexes in the collection list with the specified collections.

indexes: The indexes of the child collections to be replaced in the collection list.
collections: An array of PHCollectionMBS objects (asset collections or other collection lists) to be inserted into (or moved within) the collection list.

To ensure that the index set you specify is valid even if the collection list has changed since you fetched it, create a change request with a snapshot of the collection list’s contents using the changeRequestForCollectionList method before rearranging child collections.

The items on this page are in the following plugins: MBS Mac64bit Plugin.


The biggest plugin in space...