removeAssets(at:)
Removes the assets at the specified indexes from the asset collection.
Declaration
func removeAssets(at indexes: IndexSet)Parameters
- indexes:
The indexes of the assets to be removed from the asset collection.
Discussion
To ensure that the index set you specify is valid even if the asset collection has changed since you fetched it, create a change request with a snapshot of the asset collection’s contents using the init(for:assets:) method before removing assets. To remove objects based on their identities (without regard to their indexes in the collection), use the removeAssets(_:) method.