---
title: toolTip
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uicontrol/tooltip
---

# toolTip

The default text to display in the control’s tooltip.

## Declaration

```swift
var toolTip: String? { get set }
```

## Discussion

Discussion Set this property to the text that should appear in the tooltip. If you want your app to determine the tooltip text at a later time — for instance, to determine the text based on the current state of your app — set the delegate property of toolTipInteraction after setting toolTip with the default text. For example, the following code listing sets the tooltip’s default text and delegate for a shopping cart button: let button = UIButton(configuration: configuration, primaryAction: action) button.toolTip = "Click to add the item to your cart. Your cart is empty." button.toolTipInteraction?.delegate = self If the delegate implements the method toolTipInteraction(_:configurationAt:), the tooltip ignores the default text set in the toolTip property. For more information, see toolTipInteraction.

## See Also

### Showing tooltips

- [toolTipInteraction](uikit/uicontrol/tooltipinteraction.md)
