<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/contentShape(_:eoFill:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE12contentShape_6eoFillQrqd___SbtAA0E0Rd__lF"
  },
  "title" : "contentShape(_:eoFill:)"
}
-->

# contentShape(_:eoFill:)

Defines the content shape for hit testing.

```
nonisolated func contentShape<S>(_ shape: S, eoFill: Bool = false) -> some View where S : Shape
```

## Parameters

`shape`

The hit testing shape for the view.

`eoFill`

A Boolean that indicates whether the shape is interpreted
with the even-odd winding number rule.

## Return Value

A view that uses the given shape for hit testing.

---

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)