<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/GeometryReader3D",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI16GeometryReader3DV"
  },
  "title" : "GeometryReader3D"
}
-->

# GeometryReader3D

A container view that defines its content as a function of its own
size and coordinate space.

```
@frozen nonisolated struct GeometryReader3D<Content> where Content : View
```

## Overview

This view returns a flexible preferred size to its own container view.

This container differs from [`GeometryReader`](/documentation/SwiftUI/GeometryReader) in that
it also reads available depth, and thus also returns a flexible preferred
depth to its parent layout. Use the 3D version only
in situations where you need to read depth, because it affects
depth layout when used in a container like a [`ZStack`](/documentation/SwiftUI/ZStack).

## Topics

### Creating a geometry reader

[`init(content:)`](/documentation/SwiftUI/GeometryReader3D/init(content:))

[`content`](/documentation/SwiftUI/GeometryReader3D/content)



---

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)