---
title: "allowsHitTesting(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/allowshittesting(_:)"
---

# allowsHitTesting(_:)

Configures whether this view participates in hit test operations.

## Declaration

```swift
nonisolated func allowsHitTesting(_ enabled: Bool) -> some View

```
