<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "macCatalyst: 17.4.0 -",
    "tvOS: 17.4.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextCursorDropPositionAnimator",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITextCursorDropPositionAnimator"
  },
  "title" : "UITextCursorDropPositionAnimator"
}
-->

# UITextCursorDropPositionAnimator

```
@MainActor class UITextCursorDropPositionAnimator
```

## Overview

\abstract Provides a mechanism for displaying and animating a temporary text cursor to indicate a drop location.
\discussion For custom text view implementations that implement drag and drop functionality, use this animator providing either your own UITextCursorView
implementation or a concrete implementation to indicate at which point in your document the dropped item will be inserted. Using this animator provides
you with all of the default system animations for how the text cursor would behave.

## Topics

### Initializers

[`init!(textCursorView: (any UIView & UITextCursorView)!, textInput: (any UIView & UITextInput)!)`](/documentation/UIKit/UITextCursorDropPositionAnimator/init(textCursorView:textInput:))

Creates an animator for the given text cursor view implementation, and the document object that implements the UITextInput protocol.

### Instance Properties

[`var cursorView: (any UIView & UITextCursorView)!`](/documentation/UIKit/UITextCursorDropPositionAnimator/cursorView)

The cursor view to be animated.

[`var textInput: (any UIView & UITextInput)!`](/documentation/UIKit/UITextCursorDropPositionAnimator/textInput)

The object that implements the UITextInput protocol, used to query for geometry information regarding cursor placement.

### Instance Methods

[`func animate(alongsideChanges: (() -> Void)?, completion: (() -> Void)?)`](/documentation/UIKit/UITextCursorDropPositionAnimator/animate(alongsideChanges:completion:))

Optionally, provide an animation block or completion block to run alongside cursor appearance or position update animations.

[`func placeCursor(at: UITextPosition!, animated: Bool)`](/documentation/UIKit/UITextCursorDropPositionAnimator/placeCursor(at:animated:))

Controls the placement of the cursor, using @c textInput and @c position to compute the final frame for the cursor view.

[`func setCursorVisible(Bool, animated: Bool)`](/documentation/UIKit/UITextCursorDropPositionAnimator/setCursorVisible(_:animated:))

Controls the visibility of the cursor.

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Conforms To

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

---

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)