<!--
{
  "availability" : [
    "iOS: 13.4.0 -",
    "iPadOS: 13.4.0 -",
    "macCatalyst: 13.4.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPointerInteraction/init(delegate:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPointerInteraction(im)initWithDelegate:"
  },
  "title" : "init(delegate:)"
}
-->

# init(delegate:)

Initializes a pointer interaction object with a specified delegate object.

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

## Parameters

`delegate`

An object the framework calls to respond to pointer movements.

## 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(_:)`](/documentation/UIKit/UIPointerEffect-swift.enum/automatic(_:)). Based on the view’s appearance, `.automatic` transforms into one of the concrete effects (`.highlight`, `.lift`, `.hover`).

---

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)