<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ViewSpacing/init()",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI11ViewSpacingVACycfc"
  },
  "title" : "init()"
}
-->

# init()

Initializes an instance with default spacing values.

```
init()
```

## Discussion

Use this initializer to create a spacing preferences instance with
default values. Then use [`formUnion(_:edges:)`](/documentation/SwiftUI/ViewSpacing/formUnion(_:edges:)) to combine
preferences from other views with the new instance. You typically
do this in a custom layout’s implementation of the
[`spacing(subviews:cache:)`](/documentation/SwiftUI/Layout/spacing(subviews:cache:)) 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)