<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextViewDelegate/textView(_:textItemMenuWillDisplayFor:animator:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITextViewDelegate(im)textView:textItemMenuWillDisplayForTextItem:animator:"
  },
  "title" : "textView(_:textItemMenuWillDisplayFor:animator:)"
}
-->

# textView(_:textItemMenuWillDisplayFor:animator:)

Informs the delegate that a text item menu is about to be presented with the specified animator.

```
optional func textView(_ textView: UITextView, textItemMenuWillDisplayFor textItem: UITextItem, animator: any UIContextMenuInteractionAnimating)
```

## Parameters

`textView`

The text view showing the menu.

`textItem`

The text item for performing said action.

`animator`

Appearance animator. Add animations to this object to run them alongside the appearance transition.

---

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)