---
title: "init(delegate:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uipointerinteraction/init(delegate:)"
---

# init(delegate:)

Initializes a pointer interaction object with a specified delegate object.

## Declaration

```swift
init(delegate: (any UIPointerInteractionDelegate)?)
```

## Parameters

- `delegate`: An object the framework calls to respond to pointer movements.

## Discussion

Discussion If you create a UIPointerInteraction without a delegate by passing nil to the initializer, UIKit automatically applies a pointer effect it deems appropriate to the view. Initializing with nil is the equivalent of creating a UIPointerStyle with UIPointerEffect.automatic(_:). Based on the view’s appearance, .automatic transforms into one of the concrete effects (.highlight, .lift, .hover).
