<!--
{
  "availability" : [
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/PointerStyle/image(_:hotSpot:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI12PointerStyleV5image_7hotSpotAcA5ImageV_AA9UnitPointVtFZ::OverloadGroup"
  },
  "title" : "image(_:hotSpot:)"
}
-->

# image(_:hotSpot:)

Initializes a pointer style with a given image and hot spot.

```
static func image(_ image: Image, hotSpot: UnitPoint) -> PointerStyle
```

## Parameters

`image`

The pointer image.

`hotSpot`

The point on the image that represents the location from
which the pointer interaction occurs. For example, the hot spot of
an arrow-shaped pointer is the tip of the arrow.

## Discussion

The hot spot is the part of the pointer that must be positioned over
an onscreen element for clicking to have an effect.

For guidance on using a custom pointer, refer to
<doc://com.apple.documentation/design/Human-Interface-Guidelines/pointing-devices>
in the Human Interface Guidelines.

You may apply this pointer style to a single view or a view hierarchy
using the [`pointerStyle(_:)`](/documentation/SwiftUI/View/pointerStyle(_:)) modifier.

---

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)