---
title: "setHiddenUntilMouseMoves(_:)"
framework: appkit
role: symbol
role_heading: Type Method
path: "appkit/nscursor/sethiddenuntilmousemoves(_:)"
---

# setHiddenUntilMouseMoves(_:)

Sets whether the cursor is hidden until the mouse moves.

## Declaration

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

Discussion Do not try to counter this method by invoking unhide(). The results are undefined.

## See Also

### Setting cursor attributes

- [image](appkit/nscursor/image.md)
- [hotSpot](appkit/nscursor/hotspot.md)
- [hide()](appkit/nscursor/hide().md)
- [unhide()](appkit/nscursor/unhide().md)
