---
title: NSCollectionLayoutContainer
framework: appkit
role: symbol
role_heading: Protocol
path: appkit/nscollectionlayoutcontainer
---

# NSCollectionLayoutContainer

A protocol used to provide information about the size and content insets of a layout’s container.

## Declaration

```swift
@MainActor protocol NSCollectionLayoutContainer : NSObjectProtocol
```

## Overview

Overview In a section provider, you use the container property of the layout environment (NSCollectionLayoutEnvironment) to get information about the container of the layout, such as its size and content insets. Knowing about the container’s size while rendering the layout’s sections helps you make decisions about how to display the layout.

## Topics

### Getting content size

- [contentSize](appkit/nscollectionlayoutcontainer/contentsize.md)
- [effectiveContentSize](appkit/nscollectionlayoutcontainer/effectivecontentsize.md)

### Getting content insets

- [contentInsets](appkit/nscollectionlayoutcontainer/contentinsets.md)
- [effectiveContentInsets](appkit/nscollectionlayoutcontainer/effectivecontentinsets.md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Size and spacing

- [NSCollectionLayoutDimension](appkit/nscollectionlayoutdimension.md)
- [NSCollectionLayoutSize](appkit/nscollectionlayoutsize.md)
- [NSCollectionLayoutSpacing](appkit/nscollectionlayoutspacing.md)
- [NSCollectionLayoutEdgeSpacing](appkit/nscollectionlayoutedgespacing.md)
