<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/EdgeInsets/inset(by:edges:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10EdgeInsetsV5inset2by5edgesAcA015RectangleCornerD0V_AA0C0O3SetVtF"
  },
  "title" : "inset(by:edges:)"
}
-->

# inset(by:edges:)

Returns an inset that has been modified by the corner sizes in the
specified edges. When two corner insets diverge in their values for
the specified edge, the maximum inset value will be used. For example,
when the top edge is specified, the top inset will be adjusted by
the larger of the two heights from the top leading and trailing corner
inset sizes.

```
func inset(by corners: RectangleCornerInsets, edges: Edge.Set = .all) -> EdgeInsets
```

## Parameters

`corners`

The corner sizes to add to the insets.

`edges`

The set of corner edges which should be added to the insets.

---

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)