<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSDirectionalEdgeInsets/init(top:leading:bottom:trailing:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "s:So23NSDirectionalEdgeInsetsV3top7leading6bottom8trailingAB14CoreFoundation7CGFloatV_A3Itcfc"
  },
  "title" : "init(top:leading:bottom:trailing:)"
}
-->

# init(top:leading:bottom:trailing:)

Creates a directional edge insets structure that contains the specified values.

```
init(top: CGFloat, leading: CGFloat, bottom: CGFloat, trailing: CGFloat)
```

## Parameters

`top`

The inset on the top of an object.

`leading`

The inset on the leading edge of an object. In a left-to-right system, the left edge is the leading edge. In a right-to-left system, the right edge is the leading edge.

`bottom`

The inset on the bottom of an object.

`trailing`

The inset on the trailing edge of an object. In a left-to-right system, the right edge is the trailing edge. In a right-to-left system, the left edge is the trailing edge.

## Return Value

An initialized inset structure.

---

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)