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

# UIToolTipConfiguration

An object that a tooltip interaction delegate uses to describe the tooltip settings.

```
@MainActor class UIToolTipConfiguration
```

## Overview

Use a tooltip configuration to specify:

- The text that appears in the tooltip.
- The region that the pointer must hover over to trigger the appearance of the tooltip.

A [`UIToolTipInteraction`](/documentation/UIKit/UIToolTipInteraction) object asks for a configuration from its [`delegate`](/documentation/UIKit/UIToolTipInteraction/delegate) by calling the delegate method [`toolTipInteraction(_:configurationAt:)`](/documentation/UIKit/UIToolTipInteractionDelegate/toolTipInteraction(_:configurationAt:)).

## Topics

### Creating a tooltip configuration

[`convenience init(toolTip: String)`](/documentation/UIKit/UIToolTipConfiguration/init(toolTip:))

Creates a tooltip configuration and sets the tooltip text.

[`convenience init(toolTip: String, in: CGRect)`](/documentation/UIKit/UIToolTipConfiguration/init(toolTip:in:))

Creates a tooltip configuration, and sets the tooltip text and hover region within the view or control.

### Accessing the configuration settings

[`var toolTip: String`](/documentation/UIKit/UIToolTipConfiguration/toolTip)

The text to display in the tooltip.

[`var sourceRect: CGRect?`](/documentation/UIKit/UIToolTipConfiguration/sourceRect-8zvo1)

The region of the view or control where the pointer must hover to trigger the appearance of the tooltip.

[`@property (nonatomic, readonly) CGRect sourceRect;`](/documentation/UIKit/UIToolTipConfiguration/sourceRect-iltv)

The region of the view or control where the pointer must hover to trigger the appearance of the tooltip.

### Initializers

[`convenience init(toolTip: String, inRect: CGRect)`](/documentation/UIKit/UIToolTipConfiguration/init(toolTip:inRect:))

## Relationships

### Inherits From

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

### Conforms To

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

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

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

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

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

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

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

---

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)