---
title: NSEdgeInsets
framework: foundation
role: symbol
role_heading: Structure
path: foundation/nsedgeinsets
---

# NSEdgeInsets

A description of the distance between the edges of two rectangles.

## Declaration

```swift
struct NSEdgeInsets
```

## Overview

Overview Edge insets describe the distance between the edges of one rectangle to a related rectangle that can be described by measuring a constant but edge-specific distance from each edge. A common use for this structure is to describe the relationship between a view’s frame and its alignment rectangle.

## Topics

### Creating an edge insets structure

- [init(top:left:bottom:right:)](foundation/nsedgeinsets/init(top:left:bottom:right:).md)
- [NSEdgeInsetsMake(_:_:_:_:)](foundation/nsedgeinsetsmake(_:_:_:_:).md)
- [init()](foundation/nsedgeinsets/init().md)

### Specifying the edge insets

- [bottom](foundation/nsedgeinsets/bottom.md)
- [left](foundation/nsedgeinsets/left.md)
- [right](foundation/nsedgeinsets/right.md)
- [top](foundation/nsedgeinsets/top.md)

### Comparing edge insets

- [NSEdgeInsetsEqual(_:_:)](foundation/nsedgeinsetsequal(_:_:).md)

### Getting the zero constant

- [NSEdgeInsetsZero](foundation/nsedgeinsetszero.md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Geometry

- [CGFloat](corefoundation/cgfloat-swift.struct.md)
- [NSPoint](foundation/nspoint.md)
- [NSSize](foundation/nssize.md)
- [NSRect](foundation/nsrect.md)
- [AffineTransform](foundation/affinetransform.md)
