<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/PhotosUI/PHPickerViewController/moveAsset(withIdentifier:afterAssetWithIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PhotosUI"
    ],
    "preciseIdentifier" : "c:objc(cs)PHPickerViewController(im)moveAssetWithIdentifier:afterAssetWithIdentifier:"
  },
  "title" : "moveAsset(withIdentifier:afterAssetWithIdentifier:)"
}
-->

# moveAsset(withIdentifier:afterAssetWithIdentifier:)

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:)`](/documentation/PhotosUI/PHPickerConfiguration-swift.struct/init(photoLibrary:)).

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)