---
title: "moveAsset(withIdentifier:afterAssetWithIdentifier:)"
framework: photosui
role: symbol
role_heading: Instance Method
path: "photosui/phpickerviewcontroller/moveasset(withidentifier:afterassetwithidentifier:)"
---

# moveAsset(withIdentifier:afterAssetWithIdentifier:)

Reorders assets that are in a selected state.

## Declaration

```swift
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

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.
