<!--
{
  "availability" : [
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextInsertionIndicator/displayMode-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextInsertionIndicator(py)displayMode"
  },
  "title" : "displayMode"
}
-->

# displayMode

A value that describes the display mode of an indicator.

```
var displayMode: NSTextInsertionIndicator.DisplayMode { get set }
```

## Discussion

Set the [`displayMode`](/documentation/AppKit/NSTextInsertionIndicator/displayMode-swift.property) to [`NSTextInsertionIndicator.DisplayMode.automatic`](/documentation/AppKit/NSTextInsertionIndicator/DisplayMode-swift.enum/automatic) when your custom view becomes the first responder. When your custom view resigns first responder, set the [`displayMode`](/documentation/AppKit/NSTextInsertionIndicator/displayMode-swift.property) to [`NSTextInsertionIndicator.DisplayMode.hidden`](/documentation/AppKit/NSTextInsertionIndicator/DisplayMode-swift.enum/hidden) to indicate that key events aren’t sent to your view.

---

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)