<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSViewToolTipOwner/view(_:stringForToolTip:point:userData:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSViewToolTipOwner(im)view:stringForToolTip:point:userData:"
  },
  "title" : "view(_:stringForToolTip:point:userData:)"
}
-->

# view(_:stringForToolTip:point:userData:)

Returns the tool tip string to be displayed due to the cursor pausing at location `point` within the tool tip rectangle identified by `tag` in the view `view`.

```
@MainActor func view(_ view: NSView, stringForToolTip tag: NSView.ToolTipTag, point: NSPoint, userData data: UnsafeMutableRawPointer?) -> String
```

## Discussion

`userData` is additional information provided by the creator of the tool tip rectangle.

## See Also

  [Online Help](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/OnlineHelp/OnlineHelp.html#//apple_ref/doc/uid/10000009i)

[`func addToolTip(NSRect, owner: Any, userData: UnsafeMutableRawPointer?) -> NSView.ToolTipTag`](/documentation/AppKit/NSView/addToolTip(_:owner:userData:))

Creates a tooltip for a defined area in the view and returns a tag that identifies the tooltip rectangle.



---

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)