<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCursor/setHiddenUntilMouseMoves(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCursor(cm)setHiddenUntilMouseMoves:"
  },
  "title" : "setHiddenUntilMouseMoves(_:)"
}
-->

# setHiddenUntilMouseMoves(_:)

Sets whether the cursor is hidden until the mouse moves.

```
class func setHiddenUntilMouseMoves(_ flag: Bool)
```

## Parameters

`flag`

<doc://com.apple.documentation/documentation/Swift/true> to hide the cursor until one of the following occurs:

- The mouse moves.
- You invoke the method again, with `flag` set to <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

Do not try to counter this method by invoking [`unhide()`](/documentation/AppKit/NSCursor/unhide()). The results are undefined.

---

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)