<!--
{
  "availability" : [
    "macOS: 10.12.2 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSScrubber/moveItem(at:to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSScrubber(im)moveItemAtIndex:toIndex:"
  },
  "title" : "moveItem(at:to:)"
}
-->

# moveItem(at:to:)

Moves an item from one index to another in the scrubber.

```
func moveItem(at oldIndex: Int, to newIndex: Int)
```

## Parameters

`oldIndex`

The index of the item that you want to move.

`newIndex`

The index of the item’s new location.

---

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)