---
title: "init(toolTip:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uitooltipconfiguration/init(tooltip:)"
---

# init(toolTip:)

Creates a tooltip configuration and sets the tooltip text.

## Declaration

```swift
convenience init(toolTip: String)
```

## Parameters

- `toolTip`: The text that appears in the tooltip.

## Discussion

Discussion Create a configuration using this method to show the tooltip when the pointer hovers over any area of the view or control. For example, the following code listing creates a configuration that instructs the view to show the tooltip when the pointer hovers over any area of the view: let configuration = UIToolTipConfiguration(toolTip: "The color is \(colorName).")

## See Also

### Creating a tooltip configuration

- [init(toolTip:in:)](uikit/uitooltipconfiguration/init(tooltip:in:).md)
