moveAsset(withIdentifier:afterAssetWithIdentifier:)

moveAsset(withIdentifier:afterAssetWithIdentifier:)

moveAsset(withIdentifier:afterAssetWithIdentifier:) Instance Method of PHPickerViewController Reorders assets that are in a selected state.

func moveAsset(withIdentifier identifier: String, afterAssetWithIdentifier afterIdentifier: String?)

Parameters

identifier

The identifier that represents the asset to move.

afterIdentifier

The identifier to move the asset to.

Discussion

This method ignores assets that are invalid or aren’t in a selected state, and if you don’t specify a library when calling init(photoLibrary:)).

If afterIdentifier is nil, the identifier you specify moves to the beginning of the picker.