---
title: NSTextInsertionIndicator
framework: appkit
role: symbol
role_heading: Class
path: appkit/nstextinsertionindicator
---

# NSTextInsertionIndicator

A view that represents the insertion indicator in text.

## Declaration

```swift
class NSTextInsertionIndicator
```

## Mentioned in

Adopting the system text cursor in custom text views

## Overview

Overview NSTextView and NSTextField both use NSTextInsertionIndicator to display the insertion indicator. You can use this indicator if you have your own text engine or need to display an indicator elsewhere. To use the indicator, instantiate an NSTextInsertionIndicator, then add the view to your view hierarchy. Set the indicator view’s frame to where you want to display a text insertion indicator. The indicator has the same height as the indicator view’s frame, and centers horizontally within the indicator view’s frame. The NSTextInsertionIndicator.DisplayMode specifies whether the indicator hides, remains visible, or blinks (automatic). When set to NSTextInsertionIndicator.DisplayMode.automatic, the indicator stops blinking when you set the frame. The indicator starts blinking when the frame doesn’t change for a period of time. When the user dictates, the indicator displays a trailing glow when it is moved. Set the NSTextInsertionIndicator.DisplayMode to NSTextInsertionIndicator.DisplayMode.automatic when your custom view becomes the first responder. When your custom view resigns first responder, set the displayMode to NSTextInsertionIndicator.DisplayMode.hidden to indicate that key events aren’t sent to your view. By default the indicator’s color is textInsertionPointColor. You can set a different color.

## Topics

### Configuring indicators

- [color](appkit/nstextinsertionindicator/color.md)
- [effectsViewInserter](appkit/nstextinsertionindicator/effectsviewinserter.md)

### Setting the display mode

- [displayMode](appkit/nstextinsertionindicator/displaymode-swift.property.md)
- [automaticModeOptions](appkit/nstextinsertionindicator/automaticmodeoptions-swift.property.md)
- [NSTextInsertionIndicator.AutomaticModeOptions](appkit/nstextinsertionindicator/automaticmodeoptions-swift.struct.md)
- [NSTextInsertionIndicator.DisplayMode](appkit/nstextinsertionindicator/displaymode-swift.enum.md)

## Relationships

### Inherits From

- [NSView](appkit/nsview.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSAccessibilityElementProtocol](appkit/nsaccessibilityelementprotocol.md)
- [NSAccessibilityProtocol](appkit/nsaccessibilityprotocol.md)
- [NSAnimatablePropertyContainer](appkit/nsanimatablepropertycontainer.md)
- [NSAppearanceCustomization](appkit/nsappearancecustomization.md)
- [NSCoding](foundation/nscoding.md)
- [NSDraggingDestination](appkit/nsdraggingdestination.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Text input

- [Adopting the system text cursor in custom text views](appkit/adopting-the-system-text-cursor-in-custom-text-views.md)
- [NSTextInputContext](appkit/nstextinputcontext.md)
- [NSTextInputClient](appkit/nstextinputclient.md)
- [NSTextAlternatives](appkit/nstextalternatives.md)
- [NSTextContent](appkit/nstextcontent.md)
- [NSTextInsertionIndicator.DisplayMode](appkit/nstextinsertionindicator/displaymode-swift.enum.md)
- [NSTextInsertionIndicator.AutomaticModeOptions](appkit/nstextinsertionindicator/automaticmodeoptions-swift.struct.md)
