<!--
{
  "availability" : [
    "Xcode: 16.3.0 -",
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "XCUIAutomation",
  "identifier" : "/documentation/XCUIAutomation/XCUIElement/isHittable",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "XCUIAutomation"
    ],
    "preciseIdentifier" : "c:objc(cs)XCUIElement(py)hittable"
  },
  "title" : "isHittable"
}
-->

# isHittable

Determines if the system can compute a hit point for the element.

```
var isHittable: Bool { get }
```

## Discussion

[`isHittable`](/documentation/XCUIAutomation/XCUIElement/isHittable) returns <doc://com.apple.documentation/documentation/Swift/true> if the element exists and can be clicked, tapped, or pressed at its current location. It returns <doc://com.apple.documentation/documentation/Swift/false> if the element doesn’t exist, is offscreen, or is covered by another element.

> Note:
> ``doc://com.apple.xcuiautomation/documentation/XCUIAutomation/XCUIElement/isHittable`` only returns <doc://com.apple.documentation/documentation/Swift/true> if the element is already visible and hittable onscreen. It returns <doc://com.apple.documentation/documentation/Swift/false> for an offscreen element in a scrollable view, even if the element can be scrolled into a hittable position by calling ``doc://com.apple.xcuiautomation/documentation/XCUIAutomation/XCUIElement/click()``, ``doc://com.apple.xcuiautomation/documentation/XCUIAutomation/XCUIElement/tap()``, or another hit-point-related interaction method.

---

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)